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

73944 Коммитов

Автор SHA1 Сообщение Дата
Ted Campbell 8ad76a9219 Bug 1599936 - Add JSFunction::clearLazyScript() method. r=jandem
Ensure we avoid clobbering live GC pointers in JSFunction by using helper
methods to clear to the isIncomplete state and trigger write barriers.

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

--HG--
extra : moz-landing-system : lando
2019-11-28 12:54:03 +00:00
Ted Campbell 822ef5c4e4 Bug 1599936 - Add JSFunction::isIncomplete(). r=jandem
This replaces the 'hasUncompletedScript' accessor and removes the requirement
that 'hasScript' is already true. In general, if function is found by
scanning the GC arenas, one should check for the isIncomplete() state.

Depends on D55054

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

--HG--
extra : moz-landing-system : lando
2019-11-28 07:58:10 +00:00
Ted Campbell 0fd34ab598 Bug 1599936 - Rename JSFunction::initSelfHostLazyScript. r=jandem
This should have been 'initSelfHostedLazyScript' all along for consistency
with other method names.

Depends on D55053

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

--HG--
extra : moz-landing-system : lando
2019-11-28 07:53:17 +00:00
Ted Campbell 9dbbb30692 Bug 1599936 - Cleanups in AutoAssertFunctionDelazificationCompletion. r=jandem
Refactor slightly for readability and cleanup the conditions on function that
are checked.

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

--HG--
extra : moz-landing-system : lando
2019-11-28 07:51:48 +00:00
Noemi Erli b1b72f10cb Backed out 3 changesets (bug 1597206) as requested by sfink
Backed out changeset 334b41001234 (bug 1597206)
Backed out changeset e372ae10adb5 (bug 1597206)
Backed out changeset c82b377fbbde (bug 1597206)
2019-11-28 07:47:37 +02:00
Steve Fink 945d4c2788 Bug 1597206 - Do not populate weak keys during RegularMarking yet, and allow aborting weak marking during RegularMarking r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D54580

--HG--
extra : source : 334b41001234a56dcb32fe26792d9d730db9eea0
2019-11-28 00:51:00 +00:00
Steve Fink 6632830564 Bug 1597206 - Refactor GCMarker state management r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D54579

--HG--
extra : source : e372ae10adb5880afcf820a51ff3bdd559269b76
2019-11-28 00:49:37 +00:00
Steve Fink 299b8bb476 Bug 1597206 - Refactor enterWeakMarkingMode slightly r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D54564

--HG--
extra : source : c82b377fbbde768ad28ddfd34864185a62172f6a
2019-11-28 00:49:30 +00:00
Noemi Erli a92ab3648c Backed out 3 changesets (bug 1597206) for causing assersions in GC.cpp
Backed out changeset 334b41001234 (bug 1597206)
Backed out changeset e372ae10adb5 (bug 1597206)
Backed out changeset c82b377fbbde (bug 1597206)
2019-11-28 04:45:55 +02:00
Steve Fink 98dd00fda3 Bug 1597206 - Do not populate weak keys during RegularMarking yet, and allow aborting weak marking during RegularMarking r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D54580

--HG--
extra : moz-landing-system : lando
2019-11-28 00:51:00 +00:00
Steve Fink a7ed1794d7 Bug 1597206 - Refactor GCMarker state management r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D54579

--HG--
extra : moz-landing-system : lando
2019-11-28 00:49:37 +00:00
Steve Fink f7da169889 Bug 1597206 - Refactor enterWeakMarkingMode slightly r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D54564

--HG--
extra : moz-landing-system : lando
2019-11-28 00:49:30 +00:00
Philip Chimento 2c404590db Bug 1599743 - Handle BinASTParser tag even if BinAST not enabled. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D55024

--HG--
extra : moz-landing-system : lando
2019-11-28 00:11:58 +00:00
Andrew McCreight 139398a824 Bug 1599569 - Make nsScriptSecurityManager::ClearJSCallbacks into a static method. r=kmag
XPConnect calls this method during shutdown after the pointer to the
singleton nsScriptSecurityManager has been cleared, so it is actually
calling it with a null |this|. Nobody noticed this because it isn't
actually using |this|. This patch turns it into a static method to
make the sanitizers happy.

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

--HG--
extra : moz-landing-system : lando
2019-11-27 20:57:43 +00:00
André Bargull c35250b1b2 Bug 1599416 - Part 14: Remove TypedObject::isAttached because it always returns true. r=mgaudet
As demonstrated in the last patch, OutlineTypedObjects always have an attached
datum, which means `TypedObject::isAttached` always returns true for any
TypedObject.
The two new assertions in `OutlineTypedObject::obj_trace` have been added so
it's easier to see that `owner_` is nullptr iff `data_` is nullptr.

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

--HG--
extra : moz-landing-system : lando
2019-11-27 14:12:23 +00:00
André Bargull 5567212434 Bug 1599416 - Part 13: Make OutlineTypedObject::attach and createUnattached private methods. r=mgaudet
`OutlineTypedObject::attach` is only called when creating a new OutlineTypedObject.
By making the two `attach` functions and `createUnattached[WithClass]` private
methods, we can enforce only OutlineTypedObjects with attached data are exposed
to the user.

This is in preparation for the next patch.

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

--HG--
extra : moz-landing-system : lando
2019-11-27 13:58:26 +00:00
André Bargull 48486fe065 Bug 1599416 - Part 12: Fold AttachTypedObject into NewOpaqueTypedObject. r=mgaudet
`AttacheTypedObject` is only ever called directly after `NewOpaqueTypedObject`,
so we can merge both functions similar to the existing `NewDerivedTypedObject`
function.

This is in preparation of the next two patches.

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

--HG--
extra : moz-landing-system : lando
2019-11-27 13:58:16 +00:00
André Bargull c7ca94e017 Bug 1599416 - Part 11: Remove constant parameters. r=mgaudet
The `length` parameter is always `1`.

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

--HG--
extra : moz-landing-system : lando
2019-11-27 13:58:09 +00:00
André Bargull 710956a98e Bug 1599416 - Part 10: Simplify TypedObject::isAttached. r=mgaudet
- Instead of testing for `InlineTransparentTypedObject` and `InlineOpaqueTypedObject`
separately, we can directly test for `InlineTypedObject`.
- Because the ArrayBuffer of an `OutlineTypedObject` can never be detached, we
don't need to test for it.

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

--HG--
extra : moz-landing-system : lando
2019-11-27 13:58:05 +00:00
André Bargull fab2a2a9ef Bug 1599416 - Part 9: Remove tracking for TypedObjects with detached buffers. r=mgaudet
Because ArrayBuffers used for TypedObjects can never be detached, we can remove
a couple of additional functions which are no longer used.

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

--HG--
extra : moz-landing-system : lando
2019-11-27 13:56:51 +00:00
André Bargull f101e6b927 Bug 1599416 - Part 8: Remove view tracking for TypedObjects. r=mgaudet
`ArrayBufferObject::detach` expects all views are `ArrayBufferViewObject`, which
means detaching an ArrayBuffer used for TypedObjects already crashes anyway.
Instead let's change `ArrayBufferObject::addView` and `ABO::setFirstView` to only
accept `ArrayBufferViewObject` and then remove the `addView` call in
`OutlineTypedObject::attach`. Additionally introduce `ABO::createForTypedObject`
as the single function which can call `ABO::setHasTypedObjectViews` to mark an
ArrayBufferObject as being used for TypedObjects.

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

--HG--
extra : moz-landing-system : lando
2019-11-27 13:56:16 +00:00
André Bargull 7818859fb9 Bug 1599416 - Part 7: Remove unused lazyArrayBuffers table. r=mgaudet
Entries are never added to `lazyArrayBuffers` resp. `lazyArrayBuffers` isn't
even allocated anymore.

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

--HG--
extra : moz-landing-system : lando
2019-11-27 13:55:52 +00:00
André Bargull b576e1d462 Bug 1599416 - Part 6: Remove unused TypedObject functions. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D54710

--HG--
extra : moz-landing-system : lando
2019-11-27 13:55:32 +00:00
André Bargull 400bf6eb1e Bug 1599416 - Part 5: Remove unused TypedObject::GetByteOffset function. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D54709

--HG--
extra : moz-landing-system : lando
2019-11-27 13:55:04 +00:00
André Bargull 3efa663f83 Bug 1599416 - Part 4: Remove unused ObjectIsTransparentTypedObject function. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D54708

--HG--
extra : moz-landing-system : lando
2019-11-27 13:54:39 +00:00
André Bargull 3a7c9e89b4 Bug 1599416 - Part 3: Remove unused ObjectIsOpaqueTypedObject function. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D54707

--HG--
extra : moz-landing-system : lando
2019-11-27 13:54:15 +00:00
André Bargull 29739c8476 Bug 1599416 - Part 2: Remove unused SetTypedObjectOffset function. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D54706

--HG--
extra : moz-landing-system : lando
2019-11-27 13:53:48 +00:00
André Bargull e2d2985fc8 Bug 1599416 - Part 1: Remove unused OutlineTypedObject::notifyBufferDetached method. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D54705

--HG--
extra : moz-landing-system : lando
2019-11-27 13:53:12 +00:00
André Bargull 41741fc762 Bug 1596718 - Part 4: Add LIsNullOrUndefinedAndBranch to fuse LIsNullOrUndefined and LTestIAndBranch. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D53175

--HG--
extra : moz-landing-system : lando
2019-11-27 14:09:55 +00:00
André Bargull d2c380674c Bug 1596718 - Part 3: Handle MIsNullOrUndefined in improveTypesAtTest to remove null/undefined from the typeset. r=jandem
Remove resp. add null/undefined to the typeset in improveTypesAtTest for
MIsNullOrUndefined. That way operations on the coalesce expression can be
further optimised. For example `a += obj.prop ?? 0` where `obj.prop` is either
an Int32 or null/undefined can now be optimised to use Int32 addition, because
both possible right-hand side values are now typed as Int32.

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

--HG--
extra : moz-landing-system : lando
2019-11-27 14:06:20 +00:00
André Bargull 7bfacdd480 Bug 1596718 - Part 2: Don't emit unreachable tests in CodeGenerator::visitIsNullOrUndefined. r=jandem
We don't need to test for null/undefined if that type was never observed.

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

--HG--
extra : moz-landing-system : lando
2019-11-27 13:46:19 +00:00
André Bargull 96975a6e96 Bug 1596718 - Part 1: Add MIsNullOrUndefined::foldsTo to omit unreachable tests. r=jandem
Fold away MIsNullOrUndefined when the input is definitely null/undefined resp.
never null/undefined.

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

--HG--
extra : moz-landing-system : lando
2019-11-27 13:46:14 +00:00
André Bargull 691134316a Bug 1598869: Avoid unused function warning for Promise.any. r=jorendorff
Only define `Promise_static_any` when `NIGHTLY_BUILD` to avoid an unused
function warning.

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

--HG--
extra : moz-landing-system : lando
2019-11-27 10:15:35 +00:00
Tom Tung 883d58bccf Bug 1587007 - P2 - Having two different error message when the prefs for COOP and COEP are enabled or not; r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D50966

--HG--
extra : moz-landing-system : lando
2019-11-26 14:05:25 +00:00
Tom Tung 212da22601 Bug 1587007 - P1 - Tunnel the prefs for Coop and Coep to js; r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D51420

--HG--
extra : moz-landing-system : lando
2019-11-26 17:13:08 +00:00
Jan de Mooij 4dafd4e9c2 Bug 1524590 part 2 - Remove JS::CloneFunctionObject and JS shell 'clone' function. r=jorendorff,tcampbell
With XBL gone we don't have any real consumers left. Global scripts can still be
cloned but this removes the ability to clone arbitrary functions.

This also removes the testCloneScript jsapi-test because it's not trivial to rewrite and
I don't think it's testing anything that isn't covered by other tests.

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

--HG--
extra : moz-landing-system : lando
2019-11-27 09:42:01 +00:00
Jan de Mooij 35b6a50aa1 Bug 1524590 part 1 - Fix or remove tests using 'clone' function. r=jorendorff
We want to remove JS::CloneFunctionObject. Most tests can use
either cloneAndExecuteScript or evaluate instead.

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

--HG--
extra : moz-landing-system : lando
2019-11-27 07:47:02 +00:00
Jan de Mooij f8447efbb0 Bug 1598778 - Don't read an out-of-bounds char in ConsumeSpaces. r=jwalden
There was a similar issue in the caller, where it checks |*s != '('|.

Also changes the code to use RangedPtr so these issues become assertion failures
instead of requiring ASan.

ConsumeUntil was added to encapsulate the js_strchr_limit call.

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

--HG--
extra : moz-landing-system : lando
2019-11-26 16:40:30 +00:00
yulia eb71df2dc9 Bug 1599163 - fix nullish coalescing operator for (void 0) case; r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D54775

--HG--
extra : moz-landing-system : lando
2019-11-26 18:47:20 +00:00
Ryan Hunt 7c359088d2 Bug 1598149 - Import updated spec tests. r=lth
This commit updates our in-tree version of spec-tests to a recent bulk-memory
master (1e296604ae7c2aa2ce7619929a8817c9fd95941d) with one backport for our
addition of a bottom type. All the other backports and merges have been
dropped.

[1] https://github.com/eqrion/wasm-spec/commits/spidermonkey-tree-tests

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

--HG--
extra : moz-landing-system : lando
2019-11-26 18:24:03 +00:00
Ryan Hunt a83135abf6 Bug 1598149 - Treat data/elem.drop as shrink-to-zero, disallow zero length past end of bounds. r=lth
Spec Issue: https://github.com/WebAssembly/bulk-memory-operations/issues/124

The inline path for memory.copy/fill are updated to fallback to the OOL path
when the length is 0 to have proper bounds checking behavior.

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

--HG--
extra : moz-landing-system : lando
2019-11-26 18:23:22 +00:00
Ryan Hunt 7cefa8ce06 Bug 1598149 - Report bulk-memory failures to instantiate segments as runtime errors. r=lth
Bulk memory reduces active segments to sequences of *.init that are executed
before the start function is called. This implies that an error here is to be
reported as a RuntimeError, as an error in the start function would. The latest
spec tests for bulk-memory check this, so we're required to update as well.

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

--HG--
extra : moz-landing-system : lando
2019-11-26 19:01:01 +00:00
Dorel Luca 5758a8c26c Backed out changeset 664f0ef11e26 (bug 1598149) as per dev's request 2019-11-26 20:57:31 +02:00
Ryan Hunt ad3b40a6b8 Bug 1598149 - Report bulk-memory failures to instantiate segments as runtime errors. r=lth
Bulk memory reduces active segments to sequences of *.init that are executed
before the start function is called. This implies that an error here is to be
reported as a RuntimeError, as an error in the start function would. The latest
spec tests for bulk-memory check this, so we're required to update as well.

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

--HG--
extra : moz-landing-system : lando
2019-11-26 18:24:39 +00:00
Jeff Walden 9d88d72ec8 Bug 1598082 - Add comments to |ModuleObject::instantiateFunctionDeclarations| clarifying ownership of |funDecls|. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D54211

--HG--
extra : moz-landing-system : lando
2019-11-22 10:04:42 +00:00
Sylvestre Ledru e94f355d96 Bug 1596911 - Add missing license headers on the new managed extensions r=Gijs,MattN
Depends on D53267

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

--HG--
extra : moz-landing-system : lando
2019-11-26 15:00:00 +00:00
Sylvestre Ledru 8d2f0d1b1f Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-11-26 14:35:02 +00:00
Jon Coppeard 293374b30f Bug 1599071 - Remove unnecessary GlobalObject::getOrCreateFinalizationGroupPrototype r=anba
Differential Revision: https://phabricator.services.mozilla.com/D54689

--HG--
extra : moz-landing-system : lando
2019-11-26 10:52:03 +00:00
Ted Campbell b1c82e8668 Bug 1599104 - Add JSFunction::delazifySelfHostedLazyFunction(). r=jandem
Split out the self-hosted handling from delazifyLazilyInterpretedFunction
since it will need to be handled differently when LazyScript merges with
JSScript.

Depends on D54526

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

--HG--
extra : moz-landing-system : lando
2019-11-26 10:24:55 +00:00
Ted Campbell e3a2bc094a Bug 1599104 - Add JSFunction::enclosingScope(). r=jandem
Hide the check for LazyScript vs JSScript inside an accessor function.

Depends on D54525

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

--HG--
extra : moz-landing-system : lando
2019-11-26 10:11:09 +00:00