Граф коммитов

706159 Коммитов

Автор SHA1 Сообщение Дата
André Bargull 2aec868777 Bug 1536699 - Part 6: Add test case. r=jandem
Depends on D72643

Differential Revision: https://phabricator.services.mozilla.com/D74019
2020-05-06 15:13:20 +00:00
André Bargull 0173cf0310 Bug 1536699 - Part 5: Remove unnecessary safepoint for LLoadTypedArrayElementHole. r=jandem
`LLoadTypedArrayElementHole` used to need to a safepoint for a vm-call (bug 737783),
but this vm-call was later removed in bug 829896.

Differential Revision: https://phabricator.services.mozilla.com/D72643
2020-05-06 11:05:45 +00:00
André Bargull 20e0645e82 Bug 1536699 - Part 4: Support BigInts in MStoreUnboxedScalar and MStoreTypedArrayElementHole. r=jandem
Also adds `Register64::scratchReg()` to make sure we don't run out of registers on x86.

Differential Revision: https://phabricator.services.mozilla.com/D72642
2020-05-06 12:31:59 +00:00
André Bargull a926295890 Bug 1536699 - Part 3: Add MToBigInt and ToBigIntPolicy. r=jandem
The next part needs `ToBigIntPolicy` when storing BigInts into a typed array.

`MToBigInt` is currently only used as part of `ToBigIntPolicy`, therefore we
have to bailout for effectful operations, like `ToBigInt(object)`. Only strings
and booleans can be handled without a bailout.

Differential Revision: https://phabricator.services.mozilla.com/D72641
2020-05-06 11:05:07 +00:00
André Bargull 2c4fba5ce7 Bug 1536699 - Part 2: Support BigInts in MLoadUnboxedScalar and MLoadTypedArrayElementHole. r=jandem
There are too few registers available on x86, therefore `LLoadTypedArrayElementHoleBigInt`
is reusing the ValueOperand's type register, similar to `CacheIRCompiler::emitLoadTypedElementResult`.

`LLoadUnboxedBigInt` and `LLoadTypedArrayElementHoleBigInt` are both using an OOL vm-call
if the result BigInt can't be allocated inline, similar to `CodeGenerator::visitInt64ToBigInt`.

Differential Revision: https://phabricator.services.mozilla.com/D72640
2020-05-06 11:03:30 +00:00
André Bargull a38ee50677 Bug 1536699 - Part 1: Add missing helpers for Register64. r=jandem
These functions are needed for the next parts.

Differential Revision: https://phabricator.services.mozilla.com/D72639
2020-05-06 10:57:31 +00:00
John Lin b873d056bc Bug 1634170 - clear crypto info before reusing recycled sample. r=geckoview-reviewers,esawin
Differential Revision: https://phabricator.services.mozilla.com/D73989
2020-05-06 12:00:22 +00:00
Kartikaya Gupta b498c75baa Bug 1627010 - Disallow user from zooming out past initial zoom on desktop. r=botond
THis should continue allowing users to zoom out in RDM mode, or any time that
we are respecting the meta-viewport tag. It's only when we don't respect the
meta-viewport tag that we disable zooming out past initial zoom.

Differential Revision: https://phabricator.services.mozilla.com/D73461
2020-05-06 14:40:23 +00:00
Matthew Gaudet c1ae244650 Bug 1631123 - Correct SourceExtent diagram r=tcampbell DONTBUILD
These updated diagrams were verified using the patch below, which prints sources
and relevant offsets inside of fullyInitFromStencil.

```
diff --git a/js/src/vm/JSScript.cpp b/js/src/vm/JSScript.cpp
--- a/js/src/vm/JSScript.cpp
+++ b/js/src/vm/JSScript.cpp
@@ -4326,6 +4326,37 @@ bool JSScript::fullyInitFromStencil(JSCo
   script->assertValidJumpTargets();
 #endif

+  if (compilationInfo.sourceObject->source()->hasSourceText()) {
+    // Get the substring out of the source
+    auto str = compilationInfo.sourceObject->source()->substring(
+        cx, script->extent_.toStringStart, script->extent_.toStringEnd);
+
+    uint32_t sourceStartOffset =
+        script->extent_.sourceStart - script->extent_.toStringStart;
+    uint32_t sourceEndOffset =
+        script->extent_.sourceEnd - script->extent_.toStringStart;
+    fprintf(stderr, "sourceStart: %ud, sourceEnd: %ud\n", sourceStartOffset,
+            sourceEndOffset);
+    {
+      JS::AutoCheckCannotGC nogc(cx);
+      js::Fprinter out(stderr);
+      JSString::dumpChars(str->latin1Chars(nogc), str->length(), out);
+      out.printf("\n ");  // the ' ' is for the opening quote, to make sure the
+                          // computed carats align.
+    }
+
+    for (uint32_t i = 0; i < str->length() + 2; i++) {
+      if (i == sourceStartOffset) {
+        fprintf(stderr, "^");
+      } else if (i == sourceEndOffset) {
+        fprintf(stderr, "$");
+      } else {
+        fprintf(stderr, ".");
+      }
+    }
+    fprintf(stderr, "\n");
+  }
+
   if (coverage::IsLCovEnabled()) {
     if (!coverage::InitScriptCoverage(cx, script)) {
       return false;
```

Depends on D73928

Differential Revision: https://phabricator.services.mozilla.com/D73929
2020-05-05 21:11:47 +00:00
Matthew Gaudet 6bb014a804 Bug 1628761 - Document expectation for lineno and column of SourceExtent r=tcampbell DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D73928
2020-05-05 21:10:09 +00:00
David Teller 18a8fad225 Bug 1632794 - Bare bones about:processes;r=fluent-reviewers,florian,Pike
This is a very first iteration of about:processes, so that people who actually need the tool can start using it immediately and provide feedback.

Differential Revision: https://phabricator.services.mozilla.com/D72617
2020-05-06 20:11:55 +00:00
David Teller e67467e850 Bug 1632794 - Expose full remoteType through ChromeUtils.requestProcInfo;
The current `type` field doesn't expose all information such as the origin. Let's fix this.

Differential Revision: https://phabricator.services.mozilla.com/D72616
2020-05-06 20:11:55 +00:00
Agi Sferro 40aaada87c Bug 1635914 - Add workaround for docShellIsActive. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D74130
2020-05-06 20:49:39 +00:00
Liang-Heng Chen 481fd1a83d Bug 1631676 - collect usage of pref privacy.firstparty.isolate; r=chutten,nhnt11
Differential Revision: https://phabricator.services.mozilla.com/D73874
2020-05-06 20:19:58 +00:00
Gijs Kruitbosch 88153109ac Bug 1633790 - pass channels to stream conversion getContentType and always allow PDF.js use for user-opened local PDF files, r=mattwoodrow,jaws
Differential Revision: https://phabricator.services.mozilla.com/D73511
2020-05-06 20:34:51 +00:00
Gijs Kruitbosch 6c3c9b5bf3 Bug 1633790 - allow PDF.js use when we've misled the user into misconfiguring PDF handlers, r=jaws,mattwoodrow
Prior to this patch, PDF.js tracks both its own 'disabled' pref (which is used
by enterprise policy) and whether it is the default handler per the handler
service - but it tracks both in one bool, which determines whether its
streamconverter registers.

Really, what we want is to never use PDF.js if it's preffed off.

However, if there is some other default, it should be acceptable to use PDF.js
in some circumstances, like for <embed> or <object>s where otherwise we
would show no content at all.

Even for toplevel PDFs, if the user has configured Firefox to open PDFs in
an external helper app which is Firefox (which is currently an easy mistake
to make in the unknownContentType dialog), or has it set to the OS default,
but has changed their OS default to Firefox, we really still want to open
those PDFs with PDF.js.

This patch fixes all of this by splitting out the pref tracking from the
handler state tracking. Only the pref will completely disable PDF.js.

Then, in the streamconverter code, we check whether PDF.js should be used for
PDFs, and if there's a misconfiguration that we can correct. This code is
invoked from the parent process when we load PDFs in frames or toplevel
documents, and will prevent us from invoking PDF.js in the child if the user
would prefer that not to happen.

As a driveby, this cleans up how we track the pref inside PDF.js, and how we
get notified of changes to the handler - we were missing changes made in the
unknown content type dialog, so it seemed worth making it generic.

Differential Revision: https://phabricator.services.mozilla.com/D73510
2020-05-06 20:28:36 +00:00
Gijs Kruitbosch 4a9c79e6ab Bug 1633790 - add an API on nsIMIMEInfo that exposes whether we're the OS default handler, r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D73508
2020-05-06 20:25:29 +00:00
Gijs Kruitbosch ad6d0f5943 Bug 1633790 - remove unused method arguments in the external helper app service, r=jaws
This also renames `saveToDisk` to the more accurate `promptForSaveDestination`
given that it doesn't actually do the saving itself.

Differential Revision: https://phabricator.services.mozilla.com/D73507
2020-05-06 20:32:09 +00:00
Dylan Roeh a604ef3384 Bug 1634545 - Update GVE's tracking protection settings to fix some bugs and add more control. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D73348
2020-05-06 20:19:33 +00:00
Yura Zenevich f558d21f4d Bug 1625249 - test hittest with SVG in parent over OOP iframe. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D69664
2020-05-06 20:14:51 +00:00
Greg V e65e9412b0 Bug 1634205 - Support Gecko Profiler and Base Profiler on FreeBSD r=mstange
- supports amd64 and arm64 (aarch64)
- uses LUL for stack walking

Differential Revision: https://phabricator.services.mozilla.com/D73162
2020-05-06 17:44:19 +00:00
Dale Harvey 3fa67b082d Bug 1627538 - Extract getRegion into its own jsm r=mikedeboer,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D71165
2020-05-06 12:07:53 +00:00
Doug Thayer ab63b3edc8 Bug 1635569 - Set execute flags when prefetching images r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D73941
2020-05-06 11:53:27 +00:00
Emilio Cobos Álvarez f0c67b2c33 Bug 1635733 - Tweak the fuzz range of two tests on android.
Differential Revision: https://phabricator.services.mozilla.com/D74126
2020-05-06 19:42:24 +00:00
Ricky Stewart 7fa6493c9c Bug 1635585 - Run compilation/test_warnings.py under Python 3 r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D73970
2020-05-06 19:36:57 +00:00
Marco Bonardo b66936c3e8 Bug 1623383 - Merge some conditions in URIFixup.jsm. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D73688
2020-05-06 15:40:18 +00:00
Marco Bonardo 7a00a2e24a Bug 1623383 - Cleanup URIFixup.jsm. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D73687
2020-05-06 15:37:43 +00:00
Emily McDonough 1943cf3dcf Bug 1628041 - Use fill length rather than index to indicate a repeat(auto) in subgrid from Servo r=mats
Differential Revision: https://phabricator.services.mozilla.com/D70066
2020-05-06 19:35:03 +00:00
Bogdan Tara 7fce40912d Backed out 5 changesets (bug 1633820) for bustages complaining about TabContext CLOSED TREE
Backed out changeset 4982d41d5e6b (bug 1633820)
Backed out changeset 9803c41e42f9 (bug 1633820)
Backed out changeset 2475bbab03a8 (bug 1633820)
Backed out changeset 762f0b2c154c (bug 1633820)
Backed out changeset f9ea871a0227 (bug 1633820)
2020-05-06 22:39:46 +03:00
Daosheng Mu 7cd1c17fba Bug 1634491 - Return addref object from XRFrame::GetPose(). r=kip,smaug
Differential Revision: https://phabricator.services.mozilla.com/D73761
2020-05-06 14:45:52 +00:00
Nika Layzell 44d7330cea Bug 1633820 - Part 5: Get rid of UnsafeIPCTabContext, r=kmag
This variant was only used for service workers' openWindow method, which has
been changed to no longer behave in this way, meaning that the type can be
removed. The follow-up simplification of removing
'ContentChild::ProvideWindowCommon', and moving the logic directly into
'BrowserChild' is not done in this bug, and will be done in a follow-up instead.

Differential Revision: https://phabricator.services.mozilla.com/D72935
2020-05-06 17:42:51 +00:00
Nika Layzell e6c0899f5d Bug 1633820 - Part 4: Remove OriginAttributes from TabContext, r=kmag
This information is now redundant with 'BrowsingContext', meaning that it can be
omitted from the 'TabContext'.

Differential Revision: https://phabricator.services.mozilla.com/D72934
2020-05-06 17:41:02 +00:00
Nika Layzell da2aae6af5 Bug 1633820 - Part 3: Get rid of PBrowserOrId, r=mattwoodrow,necko-reviewers,dragana
The 'Id' variant was only used with b2g for remote `mozbrowser`s, and is no
longer relevant. The new code instead uses `PBrowser` directly in all cases.

Differential Revision: https://phabricator.services.mozilla.com/D72933
2020-05-06 17:42:41 +00:00
Nika Layzell ae47d770a2 Bug 1633820 - Part 2: Avoid creating an extra LoadContext when we already have a BrowsingContext, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D72932
2020-05-06 17:45:59 +00:00
Nika Layzell 565baed820 Bug 1633820 - Part 1: Assert Coherent Load Context, r=mattwoodrow
This patch asserts in various places that our LoadContext value on
BrowsingContext is consistent. This is done in order to get better diagnostics
for crashes such as those in bug 1629527.

Differential Revision: https://phabricator.services.mozilla.com/D72931
2020-05-06 17:40:14 +00:00
Bogdan Tara 33b760bde5 Backed out changeset 5deb673380d6 (bug 1631089) for causing bug 1635861 CLOSED TREE 2020-05-06 22:11:56 +03:00
Bogdan Tara 86530eabd1 Backed out changeset 049df3990b16 (bug 1627538) for test_autocomplete_basic_form_formActionOrigin.html failures CLOSED TREE 2020-05-06 22:09:46 +03:00
Iain Ireland a027d50452 Bug 1634135: Turn new regexp engine on by default in Nightly r=mgaudet
Pull the lever!

(After responsibly waiting for 78 to open.)

Differential Revision: https://phabricator.services.mozilla.com/D73120
2020-05-05 16:50:07 +00:00
Iain Ireland 24949e3502 Bug 1634135: Update tests to expect RegExp.prototype.dotAll r=mgaudet
These two tests need to be updated to be aware of the new dotAll flag.

If we ever have to turn off the new engine, this patch should also be temporarily reverted.

Depends on D73118

Differential Revision: https://phabricator.services.mozilla.com/D73119
2020-05-06 14:55:27 +00:00
Iain Ireland e41d82d09e Bug 1634135: Throw 'regexp too big' errors properly r=mgaudet
If a regular expression is too big, the assembler may fail with RegExpError::kTooLarge. When it does so, we want to throw an error: "regexp too big".

Until the most recent reimport of irregexp, we were actually reporting an OOM in these cases, because `CompilationResult::code` was default-constructed as an UndefinedValue and we took the "OOM in GetCode" path. Now `CompilationResult::code` is a Handle, so we crash if we try to access the value.

Making the situation slightly more complicated is the fact that we still have a macroassembler live, which means that we can't GC, which means that we can't report an error. The old code used an AutoSuppressGC for this (https://searchfox.org/mozilla-central/source/js/src/irregexp/RegExpEngine.cpp#1703), but that seems like an extremely blunt instrument.

Instead, I've refactored `CompilePattern` to call a separate `Assemble` function. This means that we clean up the macroassembler before we call `JS_ReportErrorASCII`. The new function is a straight copy-paste of the old code, except for error handling and `.` to `->` conversions for the values being passed by reference. Note that the order of checks has changed after calling `compiler->Assemble(...)`: now we check `result.Succeeded()` before examining `result.code`.

We also change the shared labels in SMRegExpMacroAssembler to be NonAssertingLabels. This suppresses assertions in the Label destructor that they are not used without being bound. The assertion is already suppressed for OOM (https://searchfox.org/mozilla-central/source/js/src/jit/Label.h#82-86), which is why we did not trigger it previously.

Differential Revision: https://phabricator.services.mozilla.com/D73758
2020-05-05 23:23:35 +00:00
Iain Ireland 4c2823c938 Bug 1634135: Update shim code r=mgaudet
There are a few changes here:

1. The code that used to be in wrapBody was moved to RegExpCompiler::PreprocessRegExp.

2. The `code` field in RegExpCompileData used to be a bare Object, and is now a Handle<Object>. (This makes named captures way easier to implement, because it lets us to allocate GC things while parsing a regexp without angering the hazard analysis.) I also took this opportunity to remove some dead code in the shim implementation of Handle.

3. Upstream V8 made a change to simplify the interface with the interpreter. Previously, the caller of IrregexpInterpreter::MatchForCallFromRuntime was responsible for allocating enough memory to hold both the capture results and the scratch registers. Now, the interpreter has the same interface as the compiler: the caller passes in a buffer large enough to hold the capture results, and the memory for the scratch registers is allocated internally. This requires a few small additions to the shim (IsInRange plus new methods on JSRegExp and SmallVector).

Depends on D73117

Differential Revision: https://phabricator.services.mozilla.com/D73118
2020-05-05 12:49:54 +00:00
Iain Ireland 302292d4f6 Bug 1634135: Fresh import of irregexp r=mgaudet
This is as good a time as any to pull in some recent upstream changes (many of which I wrote). This patch was auto-generated using import-irregexp.py. The necessary changes to the shim code are in the next patch.

Depends on D73116

Differential Revision: https://phabricator.services.mozilla.com/D73117
2020-05-05 12:49:54 +00:00
Iain Ireland d352ca357a Bug 1634135: Eagerly tier up for long regexp inputs r=mgaudet
Interpreted bytecode is ~3-5 times slower than compiled code, but ~5-10 times smaller. In general it seems like this is a good trade-off for the first few iterations, but for particularly long input strings this can cause a significant slowdown before we tier up. V8 eagerly tiers up to compiled code when the input string is 1000+ characters long. Following their lead on this fixes a significant regression in sunspider-regexp-dna.

Differential Revision: https://phabricator.services.mozilla.com/D73116
2020-05-05 12:49:54 +00:00
Iain Ireland 55ed4ba1b1 Bug 1634135: Disable named capture parsing until fully supported r=mgaudet
The engine supports parsing named captures, but we don't have the code in place to expose the captured groups. Until we do, this code will make sure that we get a syntax error when parsing them.

Differential Revision: https://phabricator.services.mozilla.com/D73115
2020-05-05 12:49:54 +00:00
Iain Ireland e409020587 Bug 1634135: Fix look-behind back-references r=jandem
If a look-behind back-reference succeeds, we have to subtract the length of the capture from the current position (so that the current position points to the beginning of the capture). We don't have the length in a register, so we have to read it from the capture registers, which are stored on the stack. However, we pushed the initial value of the current position, so the stack pointer is offset by one word from where we expect.

The fix is to pop the saved value *before* subtracting the length.

With this fix, we pass all the test262 tests for look-behind assertions, dotAll, and unicode property escapes. (I will turn them on in a separate bug.)

Depends on D73112

Differential Revision: https://phabricator.services.mozilla.com/D73113
2020-05-05 12:49:53 +00:00
Iain Ireland 7d6e295765 Bug 1634135: Fix dummy TokenStream r=djvj
This was broken by changes to token streams in bug 1592105.

Differential Revision: https://phabricator.services.mozilla.com/D73112
2020-05-05 12:49:53 +00:00
Emilio Cobos Álvarez ab9d506242 Bug 1635733 - Fuzz two tests that after bug 1311444 have fuzzy outlines on Windows.
Differential Revision: https://phabricator.services.mozilla.com/D74048
2020-05-06 14:45:01 +00:00
Sebastian Hengst 9c0ffff641 Bug 1624868 - Disable browser/base/content/test/performance/io/ on Linux ccov for almost failing permanently. r=florian DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D74039
2020-05-06 14:40:03 +00:00
Geoff Brown 02269c9305 Bug 1624649: Move android-em to pull emulator from toolchain instead of tooltool; r=wcosta,kats
This is very similar to wcosta's earlier patch, with a few adjustments to overcome
special cases:
 - remove the wrench override of adb path; handle in config instead
 - fix taskcluster config syntax in a couple of places
 - add android-sdk-linux fetch for test-verify

Differential Revision: https://phabricator.services.mozilla.com/D73157
2020-05-06 14:28:37 +00:00
James Graham 88cdbbdcc1 Bug 1631819 - Allow disabling lsan entirely for directories, r=mccr8,maja_zf
This adds a new property lsan-disabled to wpt metadata files, which takes
a boolean to determine if lsan should be entirely disabled for that directory.

Differential Revision: https://phabricator.services.mozilla.com/D73918
2020-05-06 14:04:34 +00:00