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

75148 Коммитов

Автор SHA1 Сообщение Дата
caroline 783609cf5c Bug 1615729 - Pass individual input flags as an ImmutableFlags to JSScript::Create. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D64450

--HG--
extra : moz-landing-system : lando
2020-02-26 22:43:42 +00:00
caroline 366b84080c Bug 1615729 - Move setFlags with boolean logic into SharedStencil.h r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D64449

--HG--
extra : moz-landing-system : lando
2020-02-26 22:43:34 +00:00
Ted Campbell 9c42740b5c Bug 1615710 - Use js::BaseScript in DebuggerScriptVariant. r=jandem
Fold the JSScript* and LazyScript* variant arms into a single case. The
debugger now either uses BaseScript accessors directly, or uses
DelazifyScript to ensure bytecode exists if needed.

Note that there are still seperate instances for LazyScript and JSScript so
Debugger::wrapVariantReferent continues to be careful about normalizing
references.

Differential Revision: https://phabricator.services.mozilla.com/D64367

--HG--
extra : moz-landing-system : lando
2020-02-26 17:25:54 +00:00
Ted Campbell 22182ef4f3 Bug 1615710 - Add BaseScript cases to debugger variant matchers. r=jandem
Add a BaseScript case to variant matcher classes in the debugger and forward
the JSScript and LazyScript cases to it. This will call DelazifyScript for
all cases, so fix a small issue where this failed on non-function scripts.

Subsequent patches will remove the JSScript/LazyScript cases once the variant
type is updated.

Depends on D64365

Differential Revision: https://phabricator.services.mozilla.com/D64366

--HG--
extra : moz-landing-system : lando
2020-02-26 17:18:03 +00:00
Ted Campbell 7c7dbe05bd Bug 1615710 - Cleanup DebuggerScript::CallData::getUrl(). r=jandem
Eliminate the templates and use BaseScript type instead to simplify.

Differential Revision: https://phabricator.services.mozilla.com/D64365

--HG--
extra : moz-landing-system : lando
2020-02-26 17:14:14 +00:00
Boris Zbarsky c912aa08f4 Bug 1617527. Remove the same-compartment checks when setting an exception on a JSContext r=sfink
The exception is not guaranteed to be in the context compartment anyway (e.g. changing the compartment does not wrap the exception), so there isn't much point checking it up front.  And the exception stack is always stored as an unwrapped object, so again there's no point checking it on set, since we just plan to UncheckedUnwrap it.

Differential Revision: https://phabricator.services.mozilla.com/D64004

--HG--
extra : moz-landing-system : lando
2020-02-26 21:17:15 +00:00
Nathan Froyd 179cc1aa78 Bug 1618280 - make `make distclean` work again; r=dmajor
We were using `config.status*` as a catchall in `DIST_GARBAGE` for
`config.status` and `config.statusd`.  Unfortunately, the latter was a
directory, so `rm config.status*` error'd out.  We can fix this easily
by putting `config.statusd` in `GARBAGE_DIRS`, which will use `rm -r`,
as intended.

Differential Revision: https://phabricator.services.mozilla.com/D64422

--HG--
extra : moz-landing-system : lando
2020-02-26 18:14:36 +00:00
Steve Fink 9b7d17bb03 Bug 1599295 - Account for the full mapped size of shared array buffer mappings. r=jonco
Depends on D64275

Differential Revision: https://phabricator.services.mozilla.com/D64276

--HG--
extra : moz-landing-system : lando
2020-02-26 16:09:12 +00:00
Steve Fink 366160cb21 Bug 1599295 - Report out of memory errors in shared array buffer creation path. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D64275

--HG--
extra : moz-landing-system : lando
2020-02-26 14:54:28 +00:00
Benjamin Bouvier 227931695d Bug 1618181: Skip wasm gc tests if GC isn't supported; r=lth
Differential Revision: https://phabricator.services.mozilla.com/D64356

--HG--
extra : moz-landing-system : lando
2020-02-26 14:03:14 +00:00
Jon Coppeard 43803c34ee Bug 1617902 - Move GCParallelTask methods from vm/HelperThreads.cpp to new gc/GCParallelTask.cpp file r=sfink
This moves some GC-specific code to a new file under the GC directory.

Differential Revision: https://phabricator.services.mozilla.com/D64148

--HG--
extra : moz-landing-system : lando
2020-02-26 14:00:41 +00:00
Jon Coppeard dbc25fc9f0 Bug 1617902 - Make AutoRunParallelTask take a pointer to a GCRuntime member function and remove static methods r=sfink
Rather than having AutoRunParallelTask call a function that mostly has to interact with GCRuntime, it's more sensible to make this call a GCRuntime method via member function pointer.  The syntax is a little gross but this means we can get rid of a few friend declarations that were only necessary to allow these functions access to GCRuntime again.

Differential Revision: https://phabricator.services.mozilla.com/D64147

--HG--
extra : moz-landing-system : lando
2020-02-26 14:00:08 +00:00
Jon Coppeard 8ddbf6c1fe Bug 1617902 - Make GCParallelTask work function back into a virtual method r=sfink
This was previously turned from a virtual method into a function pointer because of threading concerns (destroying an instance of a class with virtual methods will write to the vtable before calling superclass destructors which may cause race conditions).  However this concern is moot since we made runTask() virtual so that it could be used by XPCOM thread pools.  The concern about race conditions is handled by an assertion in the GCParallelTask destructor.

Differential Revision: https://phabricator.services.mozilla.com/D64146

--HG--
extra : moz-landing-system : lando
2020-02-26 13:59:24 +00:00
Ted Campbell d286a3d930 Bug 1615710 - Remove Debugger::ScriptQuery::lazyScriptVector. r=jandem
Once we use BaseScript as the root type, we can combine the ScriptQuery
result vectors which will be concatenated anyways.

Depends on D64124

Differential Revision: https://phabricator.services.mozilla.com/D64125

--HG--
extra : moz-landing-system : lando
2020-02-26 08:03:43 +00:00
Ted Campbell 0ac67e20a4 Bug 1615710 - Remove the Debugger::lazyScripts weakmap. r=jandem
This can be combined with the Debugger::scripts map since keys will not
conflict. This is now all possible since we use js::BaseScript as the root
type.

Depends on D64123

Differential Revision: https://phabricator.services.mozilla.com/D64124

--HG--
extra : moz-landing-system : lando
2020-02-26 13:52:18 +00:00
Ted Campbell 5603c8e0b3 Bug 1615710 - Remove Debugger::wrapLazyScript. r=jandem
Replace with calls to wrapScript instead. Within wrapScript we now check if
script is lazy or not. This paves way to removing LazyScript* from the
DebuggerReferentVariant.

Depends on D64122

Differential Revision: https://phabricator.services.mozilla.com/D64123

--HG--
extra : moz-landing-system : lando
2020-02-26 07:52:08 +00:00
Ted Campbell e68ab58cf6 Bug 1615710 - Use BaseScript in Debugger ScriptWeakMap. r=jandem
This lets us eventually combine the lazy and non-lazy lists. To make this
work, we need to explicitly pass the expected type of variant element instead
of deducing it from the map.

Differential Revision: https://phabricator.services.mozilla.com/D64122

--HG--
extra : moz-landing-system : lando
2020-02-26 07:48:09 +00:00
Ted Campbell 8e142f7202 Bug 1615710 - Use BaseScriptVector in Debugger. r=jandem
Replace the uses of ScriptVector and LazyScriptVector.

Depends on D64120

Differential Revision: https://phabricator.services.mozilla.com/D64121

--HG--
extra : moz-landing-system : lando
2020-02-26 07:57:00 +00:00
Ted Campbell 7cee9e4c9c Bug 1615710 - Simplify parts of debugger affecting LazyScript. r=jandem
- Simplify js::CheckDebugeeThing
- Simplify DelazifyScript
- Inline js::EnsureFunctionHasScript into callers and avoid using
  JSFunction::nonLazyScript() method.

Depends on D64119

Differential Revision: https://phabricator.services.mozilla.com/D64120

--HG--
extra : moz-landing-system : lando
2020-02-26 07:42:37 +00:00
Ted Campbell 2d1aa63ece Bug 1615710 - Simplify debugger usage of BaseScript::sourceObject. r=jandem
In Bug 1512509 we simplified BaseScript::sourceObject() to never use
cross-compartment edges. As a result we can simplify the debugger access of
sourceObject within this patch.

Differential Revision: https://phabricator.services.mozilla.com/D64119

--HG--
extra : moz-landing-system : lando
2020-02-26 07:38:23 +00:00
Jon Coppeard 75df4ae4ff Bug 1618131 - Poison moved GC thing contents sooner r=jandem
This makes sure we will detect use of the contents of moved GC things during the update phase of the GC, not just when we return to the mutator as previously. Annoyingly we need to preserve contents for native objects with fixed elements because the elements flags are stored there and these may be accessed from other objects if they are COW elements.

This caught a use of unforwarded scripts during invalidation caused by OOM during sweeping type information.

Differential Revision: https://phabricator.services.mozilla.com/D63872

--HG--
extra : moz-landing-system : lando
2020-02-26 13:36:45 +00:00
Jon Coppeard 7556ab1743 Bug 1618131 - Assert that compacting GC only ever updates unmoved GC things or new copies of moved things and never the old copy r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D63871

--HG--
extra : moz-landing-system : lando
2020-02-26 13:36:12 +00:00
Jan de Mooij 7b9484a975 Bug 1617564 part 2 - Add minimal WarpBuilder prototype. r=iain
This has just enough code to be able to compile a "return 0;" function,
including off-thread MIR building.

The new builder consists of two parts:
* WarpOracle: runs on the main thread, produces a WarpSnapshot.
* WarpBuilder: can run off-thread, uses the WarpSnapshot to generate MIR.

WarpOracle will make a lot of the optimization decisions (which scripts can be
compiled, which ICs are copied, which functions we want to inline). WarpBuilder
will do 'just' MIR building.

This is an early prototype; the code is expected to change significantly the
coming weeks/months.

Differential Revision: https://phabricator.services.mozilla.com/D64013

--HG--
extra : moz-landing-system : lando
2020-02-26 13:30:21 +00:00
Jan de Mooij 124d08ccb2 Bug 1617564 part 1 - Add a --warp shell flag. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D64012

--HG--
extra : moz-landing-system : lando
2020-02-26 09:21:44 +00:00
Brindusan Cristian 7492073dff Backed out 2 changesets (bug 1618131) for linux build bustages at Poison.h. CLOSED TREE
Backed out changeset e3c661a8798f (bug 1618131)
Backed out changeset 86e126a20395 (bug 1618131)
2020-02-26 13:00:51 +02:00
Jon Coppeard b465bdf8f7 Bug 1618131 - Poison moved GC thing contents sooner r=jandem
This makes sure we will detect use of the contents of moved GC things during the update phase of the GC, not just when we return to the mutator as previously. Annoyingly we need to preserve contents for native objects with fixed elements because the elements flags are stored there and these may be accessed from other objects if they are COW elements.

This caught a use of unforwarded scripts during invalidation caused by OOM during sweeping type information.

Differential Revision: https://phabricator.services.mozilla.com/D63872

--HG--
extra : moz-landing-system : lando
2020-02-26 10:17:39 +00:00
Jon Coppeard 558314a58a Bug 1618131 - Assert that compacting GC only ever updates unmoved GC things or new copies of moved things and never the old copy r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D63871

--HG--
extra : moz-landing-system : lando
2020-02-26 10:17:07 +00:00
André Bargull f812612132 Bug 1617848: Assert ObjectGroup addendum is tenured. r=jandem
Uses a reinterpret_cast so we don't need to include `JSFunction.h` in this
header.

Differential Revision: https://phabricator.services.mozilla.com/D64034

--HG--
extra : moz-landing-system : lando
2020-02-26 09:59:19 +00:00
Andrew McCreight de671d8e92 Bug 1604593 - Weaken assert in getNonWrapperObjectForCurrentCompartment(). r=bzbarsky
If we try to wrap an inner whose outer has navigated out of process,
then we'll get a remote window proxy, not a window proxy.

This was happening during the JS devtools test
browser_webconsole_block_mixedcontent_securityerrors.js

Differential Revision: https://phabricator.services.mozilla.com/D64217

--HG--
extra : moz-landing-system : lando
2020-02-26 04:22:13 +00:00
Mike Shal b1dbf109ed Bug 1606922 - Move MOZ_AUTOMATION_PACKAGE_TESTS from mozconfigs to taskcluster; r=tomprince,chmanchester
We don't need to package tests for builds that we don't actually run
tests from, but it is tricky to align this correctly by setting
MOZ_AUTOMATION_PACKAGE_TESTS=0 in relevant mozconfigs. Instead we can
set the environment variable in the task definition, and use a full
taskgraph verification check to ensure that the flag is only set on
builds that have tests.

The one tricky area is the win64-aarch64 builds, which have a workaround
by specifying the new skip-verify-test-packaging attribute.

In one case, win64-aarch64-shippable has tests that run against it, but
it copies those tests from a win64-aarch64-shippable-no-eme task, which
itself has no tests. Both of those tasks need to skip the verify check
as a result.

In another case, the win64-aarch64-eme task is an artifact build that
grabs test packages from the win64-aarch64 build. Since the win64-aarch64
build doesn't have tests, it needs to skip the verify check.

Differential Revision: https://phabricator.services.mozilla.com/D59426

--HG--
extra : moz-landing-system : lando
2020-02-25 20:13:12 +00:00
Kris Maglione c31aa68fb4 Bug 1535617: Part 2 - Clear weak references for most cycle collected objects on unlink. r=mccr8
This covers most cycle collected objects which support weak references, but
not the ones which inherit from a cycle collected class and don't do any cycle
collection on their own.

Differential Revision: https://phabricator.services.mozilla.com/D63962

--HG--
extra : moz-landing-system : lando
2020-02-25 19:44:39 +00:00
André Bargull 080169b1aa Bug 1613713 - Part 6: Enable Intl.Locale by default. r=jwalden
Some tests needed to be updated to account for an `Intl` constructor whose
prototype doesn't have a `resolvedOptions` method.

Differential Revision: https://phabricator.services.mozilla.com/D61875

--HG--
extra : moz-landing-system : lando
2020-02-25 18:47:42 +00:00
André Bargull 9914c761ae Bug 1613713 - Part 5: Canonicalise transform extension subtags. r=jwalden
Canonicalises the `tlang` subtag of a transform extension per the usual rules
for canonicalising the base name parts of a locale identifier. In addition to
that, deprecated `tvalue` subtags are now also replaced with their preferred
replacements according to the `alias` data from CLDR.

Differential Revision: https://phabricator.services.mozilla.com/D61873

--HG--
extra : moz-landing-system : lando
2020-02-25 18:01:16 +00:00
André Bargull 5350ec886f Bug 1613713 - Part 4: Remove UnicodeExtensionCanonicalForm option. r=jwalden
Unicode extension subtags are now canonicalised for all operations, so we no
longer need the UnicodeExtensionCanonicalForm enum.

Unicode extension types provided through option objects are also canonicalised
to ensure no uncanonicalised locales are exposed. This also avoids triggering
various assertions where we assume we only expose fully canonicalised locales.

Also see: https://github.com/tc39/proposal-intl-locale/issues/96

Differential Revision: https://phabricator.services.mozilla.com/D61872

--HG--
extra : moz-landing-system : lando
2020-02-25 17:57:27 +00:00
André Bargull 639a012e05 Bug 1613713 - Part 3: Add variant subtag canonicalisation. r=jwalden
Variant subtag canonicalisation is back, but with slightly different semantics
compared to IANA BCP 47 canonicalisation.

Differential Revision: https://phabricator.services.mozilla.com/D61871

--HG--
extra : moz-landing-system : lando
2020-02-25 17:55:06 +00:00
André Bargull a61211e0b3 Bug 1613713 - Part 2: Update comments for UTS 35. r=jwalden
Parts 3 and 5 will implement the missing canonicalisation steps for variant
and transform extension subtags.

Differential Revision: https://phabricator.services.mozilla.com/D61870

--HG--
extra : moz-landing-system : lando
2020-02-25 17:48:24 +00:00
André Bargull e09dc7f796 Bug 1613713 - Part 1: Update spec references. r=jwalden
Also reorder "caseFirst" to match the updated spec position.

Differential Revision: https://phabricator.services.mozilla.com/D61869

--HG--
extra : moz-landing-system : lando
2020-02-25 17:46:32 +00:00
André Bargull 12847dea6d Bug 1617196 - Part 2: Remove no longer used bailout kinds. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D63671

--HG--
extra : moz-landing-system : lando
2020-02-25 18:06:45 +00:00
André Bargull 1919e45ad4 Bug 1617196 - Part 1: Use an ool vm-call instead of a bailout for LCheckReturn. r=jandem
Branching on `undefined` in the newly added `ThrowBadDerivedReturnOrUninitializedThis`
function makes it possible to differentiate when `ThrowUninitializedThis()` and when
`ThrowBadDerivedReturn()` needs to be called.

Differential Revision: https://phabricator.services.mozilla.com/D63670

--HG--
extra : moz-landing-system : lando
2020-02-25 10:06:21 +00:00
André Bargull f8ca77cb52 Bug 1617853: Primitive values can't occur in super-property accesses. r=tcampbell
Only the receiver in a super property access can be a primitive value, the
holder value is guaranteed to be an object, because it's computed from
SuperBase, which always returns an object.

Differential Revision: https://phabricator.services.mozilla.com/D64045

--HG--
extra : moz-landing-system : lando
2020-02-25 18:07:33 +00:00
Andreea Pavel ed684420f3 Backed out changeset bc9bf388d476 (bug 1606922) for failing gecko decision task on a CLOSED TREE 2020-02-25 19:54:53 +02:00
Mike Shal 0bff663e83 Bug 1606922 - Move MOZ_AUTOMATION_PACKAGE_TESTS from mozconfigs to taskcluster; r=tomprince,chmanchester
We don't need to package tests for builds that we don't actually run
tests from, but it is tricky to align this correctly by setting
MOZ_AUTOMATION_PACKAGE_TESTS=0 in relevant mozconfigs. Instead we can
set the environment variable in the task definition, and use a full
taskgraph verification check to ensure that the flag is only set on
builds that have tests.

The one tricky area is the win64-aarch64 builds, which have a workaround
by specifying the new skip-verify-test-packaging attribute.

In one case, win64-aarch64-shippable has tests that run against it, but
it copies those tests from a win64-aarch64-shippable-no-eme task, which
itself has no tests. Both of those tasks need to skip the verify check
as a result.

In another case, the win64-aarch64-eme task is an artifact build that
grabs test packages from the win64-aarch64 build. Since the win64-aarch64
build doesn't have tests, it needs to skip the verify check.

Differential Revision: https://phabricator.services.mozilla.com/D59426

--HG--
extra : moz-landing-system : lando
2020-02-24 19:08:23 +00:00
Jon Coppeard c49a7308d8 Bug 1615362 - Registered targets shouldn't keep their FinalizationGroup alive r=sfink
FinalizationGroups are no longer held live by their targets but are still held live when their cleanup callback is queued. According to the spec implementations are allowed to cancel FinalizationGroup callbacks if the FinalizationGroup dies, but I didn't do that because it adds complexity (we would need the browser to have weak pointers to queued groups).

The patch makes FinalizationRecordObject's FinalizationGroup pointer weak by storing it in a private value and sweeping it as necessary. We need a trace method to update the pointer when it's moved by the GC, but only if traceWeakEdges() is true. We also need a read barrier in case we want to queue cleanup callbacks for an otherwise unreferenced finalization group.

Then this adds a set of all active record objects to the FinalizationGroup objects so we can clear their pointer to group when it dies. We can't do this during sweeping because the group may not be in the same sweep group as the target and so may die earlier or later.

Differential Revision: https://phabricator.services.mozilla.com/D62786

--HG--
extra : moz-landing-system : lando
2020-02-25 16:32:53 +00:00
Jon Coppeard f71c894e49 Bug 1615362 - Improve documentation about FinalizationGroup data structures r=sfink
As a first step to figuring out how to proceed, improve the documentation to show where FinalizationRecordVectorObject is used and to show the types in a couple of places.

Differential Revision: https://phabricator.services.mozilla.com/D62932

--HG--
extra : moz-landing-system : lando
2020-02-25 16:32:53 +00:00
Simon Giesecke a37e47b760 Bug 1617863 - Make JS_ReadStructuredClone accept a const& to JSStructuredCloneData. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D64054

--HG--
extra : moz-landing-system : lando
2020-02-25 16:05:14 +00:00
Matthew Gaudet b203d93434 Bug 1617306 - Move MutableScriptFlags into SharedStencil r=caroline
Differential Revision: https://phabricator.services.mozilla.com/D63942

--HG--
extra : moz-landing-system : lando
2020-02-25 13:19:11 +00:00
Matthew Gaudet 676b74b5af Bug 1617306 - Change implementation of SharedStencil ImmutableFlags to prepare for sharing r=caroline
Differential Revision: https://phabricator.services.mozilla.com/D63941

--HG--
extra : moz-landing-system : lando
2020-02-25 13:19:10 +00:00
Benjamin Bouvier 025a3953a5 Bug 1617593: Make AllocationIntegrityState debug only; r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D63910

--HG--
extra : moz-landing-system : lando
2020-02-25 14:39:34 +00:00
Benjamin Bouvier 5d06a686d7 Bug 1617593: Remove unused populateSafepoinst in AllocationIntegrityState; r=jandem
This was always set to false after the StupidAllocator has been removed, so we
could replace it at uses.

Differential Revision: https://phabricator.services.mozilla.com/D63909

--HG--
extra : moz-landing-system : lando
2020-02-25 14:39:27 +00:00
Benjamin Bouvier 207842a96f Bug 1617593: Remove the StupidAllocator; r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D63853

--HG--
extra : moz-landing-system : lando
2020-02-25 14:39:19 +00:00