Commit Graph

66167 Commits

Author SHA1 Message Date
Gabriele Svelto
50ba13cce4 Bug 1348273 - Convert crash annotations into a machine-readable list of constants; r=ted.mielczarek,njn,dholbert,mak,cpearce,mcmanus,froydnj,Dexter,jrmuizel,jchen,jimm,bz,surkov
This introduces the machinery needed to generate crash annotations from a YAML
file. The relevant functions are updated to take a typed enum (in C++) and an
integer constant (in JavaScript). A JavaScript wrapper around the crash
reporter service is provided to hold the constants. The existing whitelists
and blacklists of annotations are also generated from the YAML file and the
existing duplicate code has been consolidated. Once written out to the .extra
file the annotations are converted in string form and are no different than
the existing ones.

All existing annotations have been included (and some obsolete ones removed)
and all call sites have been updated including tests.

--HG--
extra : rebase_source : b4f0d4bf83c64851028c271d3fab3ebcb6fbcd3e
2018-07-05 15:42:11 +02:00
Nika Layzell
051eb6dcbd Bug 1480624 - Part 2: Add a DestructValue method to XPConnect to run XPT Type destructors, r=mccr8
Summary:
DestructValue acts a lot like CleanupValue, however in addition to normal
cleanup work, it invokes the destructor of complex data types. This is important
to ensure that constructors and destructors are matched for these complex data
types.

CleanupValue is also used to clean up a value without destructing it, so cannot
be modified in-place.

Depends On D2689

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1480624

Differential Revision: https://phabricator.services.mozilla.com/D2690
2018-08-03 15:55:13 -04:00
Nika Layzell
f1902ff595 Bug 1480624 - Part 1: Add XPT_FOR_EACH_*_TYPE macros to xptinfo.h, r=mccr8
Summary:
This macro simplifies code which allows performing an operation on or
extracting information from a particular nsXPTType's native representation.

It is also used in part 2 to implement xpc::DestructValue.

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1480624

Differential Revision: https://phabricator.services.mozilla.com/D2689
2018-08-03 15:55:13 -04:00
Coroiu Cristina
1ba19a32ac Backed out changeset 86471a18672f (bug 1348273) for ESlint failure at toolkit/modules/WebNavigationChild.jsm
--HG--
extra : rebase_source : e0c94f49ddc1f1b119b72c06fccc1b4363b9d340
2018-08-03 22:48:51 +03:00
Gabriele Svelto
eff24befbd Bug 1348273 - Convert crash annotations into a machine-readable list of constants; r=ted.mielczarek,njn,dholbert,mak,cpearce,mcmanus,froydnj,Dexter,jrmuizel,jchen,jimm,bz,surkov
This introduces the machinery needed to generate crash annotations from a YAML
file. The relevant functions are updated to take a typed enum (in C++) and an
integer constant (in JavaScript). A JavaScript wrapper around the crash
reporter service is provided to hold the constants. The existing whitelists
and blacklists of annotations are also generated from the YAML file and the
existing duplicate code has been consolidated. Once written out to the .extra
file the annotations are converted in string form and are no different than
the existing ones.

All existing annotations have been included (and some obsolete ones removed)
and all call sites have been updated including tests.

--HG--
extra : rebase_source : f0e8d229581ac5c0daa0e0454cb258746108e28d
2018-07-05 15:42:11 +02:00
André Bargull
ec9dce89df Bug 1478503: Shrink capacity when modifying length on a non-extensible array. r=jandem 2018-08-02 13:03:04 -07:00
Lars T Hansen
26b46f82a4 Bug 1479718 - Allow Wasm to prevent a TypedObject constructor from being invoked from JS. r=till
TypedObjects that map Wasm structs with fields that have Ref type are
not yet constructible from JS because the type constraint can't be
honored.  So for now, make it possible for Wasm to flag such structs
as unconstructible-from-JS.

--HG--
extra : rebase_source : aab9d7f2ba7b4c1ff7875d184b86bb0ae3e32413
extra : intermediate-source : 97c72ae6e843fe1cb712bd4855d174fc711c3cb0
extra : source : f59588ebc5c4ff06bfb437896147e07cb856e355
2018-07-31 10:45:55 +02:00
Lars T Hansen
27be8bc412 Bug 1478982 - Allow TypedObject fields to be flagged immutable. r=till
This allows internal clients (notably Wasm) to flag TO fields as
immutable; we need this both to provide immutability for fields that
are declared immutable in wasm structs, and to temporarily avoid the
need for type constraints on assignments to Ref-typed pointer fields.

--HG--
extra : rebase_source : 19d1b1bf81396ca305b699cda0277fd8e41f5fe9
extra : intermediate-source : d219c9587f920a0f5924dbdab3e8cf5dfecf3f75
extra : source : f1161dd31ac1cf6f050315d04b978b9d6c0c824a
2018-07-27 13:33:44 +02:00
Lars T Hansen
39bda38c95 Bug 1468524 - Fix instanceof for TypedObject 'struct' instances. r=till
Struct types need to appear to be callable, or some paths through the
engine will not think that they are constructors (since constructors
are callable).

They are not *actually* callable however; the call implementation
always throws.

--HG--
extra : rebase_source : a0db93050943bda3348887c8a63a374e19158d41
extra : source : 437198f32338d69602f3375f94a996f3d880fa17
2018-07-31 10:48:26 +02:00
Lars T Hansen
37d3b18077 Bug 1480012 - Generalize JS shell mailbox to Wasm memories and modules. r=luke
In the old days we could only share a SharedArrayBuffer, but now we
can also share WasmMemory and WasmModule objects.  Rename the shell's
get/setSharedArrayBuffer as get/setSharedObject and generalize them to
handle the new types.

Leave the old names in place as aliases of the new names.

We rename /some/ uses of get/setSharedArrayBuffer in existing test
cases, but leave uses in test262 alone; we need to upstream those more
carefully.

--HG--
extra : rebase_source : 5ca04306a739249a70fc4aa8734b08e16d62f7d4
extra : source : fcd471c23cf3c1374541df766fd5aea0628fb2a5
2018-08-01 13:21:06 +02:00
Bogdan Tara
f2cb75b28c Merge inbound to mozilla-central. a=merge 2018-08-03 13:16:27 +03:00
Kristen Wright
fbf7880ab6 Bug 1478942 - Convert UniquePtr<SimpleEdgeRange> back to UniquePtr<EdgeRange> to return an EdgeRange. r=erahm 2018-07-27 11:00:40 -07:00
André Bargull
99b08c5930 Bug 1472211 - Part 2: Reorder operands in Super-Elem bytecode operations. r=arai 2018-07-31 06:54:07 -07:00
André Bargull
997b7657f1 Bug 1472211 - Part 1: Reorder super-property evaluation order per latest spec change. r=arai, f=Waldo 2018-07-31 13:54:38 -07:00
André Bargull
94f1ed78bd Bug 1476417: Add a resume point after assigning to a mapped argument. r=jandem 2018-07-25 06:41:30 -07:00
André Bargull
ee1962ac13 Bug 1480018: Change some Base(Value)Index users to BaseObject(Element|Slot)Index. r=mgaudet 2018-08-02 08:02:17 -07:00
André Bargull
86ac00a6ad Bug 1480116: Improve codegen for LIsConstructor, LConvertElementsToDoubles, and the surrogate check in PrepareAndExecuteRegExp. r=mgaudet 2018-08-02 13:12:50 -07:00
Narcis Beleuzu
394893c006 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-08-03 01:35:43 +03:00
Narcis Beleuzu
4684ccf98e Merge inbound to mozilla-central. a=merge 2018-08-03 01:28:14 +03:00
Boris Zbarsky
d4993da381 Bug 1476142 part 4. Remove some unnecessary QIs on window in various parts of the tree. r=kmag
The crashtest was not testing anything useful, because getInterface is no longer exposed to web content.
2018-08-02 15:26:48 -04:00
Markus Stange
8a19b9e4c6 Bug 1476793 - Teach HelperThread how to push/pop profiler label frames, and use this capability to push an IDLE frame when the thread is idle. r=njn,sfink
MozReview-Commit-ID: 6HIWrA27X87

--HG--
extra : rebase_source : cdf4e2e8a15eea8910e3aad8a78d55463e9ce4da
2018-08-02 13:49:48 -04:00
André Bargull
ef37dfccdd Bug 1480145: Annotate jit-spew with the VMFunction name when available and annotate String and RegExp stubs. r=nbp 2018-08-02 08:03:52 -07:00
André Bargull
3bb1da55e3 Bug 1480020: Change js::jit::Relocation into an enum class. r=tcampbell
--HG--
extra : rebase_source : 740f0c481bff883ccd4487092963a4b0ffe2caf3
2018-08-02 08:02:40 -07:00
André Bargull
63fd8090b2 Bug 1480077: Avoid signed integer overflow in Atomics.store and when printing assembler code. r=lth 2018-08-02 08:03:06 -07:00
Jan de Mooij
3af36d3d86 Bug 1479363 part 10 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in other directories. r=mrbkap 2018-08-02 19:30:17 +02:00
Brian Hackett
9d640e972e Bug 1479547 Part 3 - Require GCs to happen at deterministic points, r=jonco.
--HG--
extra : rebase_source : c1413a579821ff73331a01f45a89fc87ccd1f55a
2018-07-31 19:36:49 +00:00
Brian Hackett
346271c0b1 Bug 1479547 Part 2 - Disable nursery when recording/replaying, r=jonco.
--HG--
extra : rebase_source : eca78f8927f0ab3f50928f71930400152f4f138d
2018-07-31 19:35:43 +00:00
Brian Hackett
51e310f29a Bug 1479547 Part 1 - Remove instrumentation related to non-deterministic GCs, r=mccr8.
--HG--
extra : rebase_source : 6dfc65ab83e770da6e1f64003379156c3b863050
2018-07-31 19:34:50 +00:00
Brian Hackett
f43431cd1c Bug 1479651 - Use correct pointer for registering deferred finalization thing for SandboxPrivate, r=smaug.
--HG--
extra : rebase_source : 88e76371da6ba2c75c1bc88c380d1498a603183d
2018-07-31 19:33:04 +00:00
Brian Hackett
6e76fd5470 Bug 1479645 - Don't unwrap CPOWs in middleman processes, r=mccr8.
--HG--
extra : rebase_source : 66d4795e2122458233b40752527267d52a9b4bc1
2018-07-31 19:30:02 +00:00
Ted Campbell
acfc088f54 Bug 1471878 - Use alignas on gc::Cell instead of manual padding. r=jonco
MozReview-Commit-ID: 8E7Os4Rsh5M
2018-08-02 12:17:32 -04:00
Nathan Froyd
3dc6481a30 Bug 1444141 - part 4 - make the JS engine depend on Rust; r=chmanchester,glandium,jorendorff
The Rust dependency in Firefox has been limited to Firefox builds by
virtue of having the Rust check in a Firefox-specific location,
toolkit/moz.configure.  For JS to start depending on Rust, we need to
move that check to a location where a standalone JS engine build will
pick up the Rust check.
2018-08-02 11:00:21 -05:00
Boris Zbarsky
357b6b1348 Bug 1479570. Get Add a getter to get a docshell from nsIWindowlessBrowser. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D2669

--HG--
extra : moz-landing-system : lando
2018-08-03 00:05:07 +00:00
Steve Fink
f5faa47091 Bug 1475446 - Use in-tree zlib for msan, r=jonco
--HG--
extra : topic : gcstats.thresh
extra : rebase_source : 5db54943138f3a5b7395cd52faedfa89aa95a872
2018-07-11 17:35:10 -07:00
Steve Fink
d9a51f4b8a Bug 1469965 - Display trigger threshold exceeded in MOZ_GCTIMER output, r=pbone
--HG--
extra : topic : gcstats.thresh
extra : rebase_source : b41ce4f5dd8a9e78df0ea582078eedba3673c187
2018-05-16 16:15:12 -07:00
Noemi Erli
58e27f3dd9 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-08-02 12:04:24 +03:00
Noemi Erli
8f66a71e70 Merge inbound to mozilla-central. a=merge 2018-08-02 11:54:46 +03:00
dvarga
956d57e7f2 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-08-02 01:26:29 +03:00
dvarga
e487e6e564 Merge inbound to mozilla-central. a=merge 2018-08-02 01:09:38 +03:00
Jan de Mooij
b76b70469b Bug 1472973 part 16 - Remove js::GetGlobalForObjectCrossCompartment. r=luke 2018-08-02 09:15:42 +02:00
Jan de Mooij
741c3a4130 Bug 1479712 part 5 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in xpc::StackScopedClone. r=bholley 2018-08-02 09:15:42 +02:00
Jan de Mooij
4cda94fb7d Bug 1479712 part 4 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in NativeInterface2JSObject. r=bholley
Also fixes some callers to not pass a potential CCW.
2018-08-02 09:15:42 +02:00
Jan de Mooij
1d54f66140 Bug 1479712 part 3 - Remove unnecessary AutoJSContext and JSAutoRealmAllowCCW in JSObject2NativeInterface and nsXPConnect::WrapJS. r=bholley 2018-08-02 09:15:42 +02:00
Jan de Mooij
af31466131 Bug 1479712 part 2 - Remove unused nsIXPConnect.getWrappedNativePrototype. r=bholley 2018-08-02 09:15:41 +02:00
Jan de Mooij
f672f4f7b6 Bug 1479712 part 1 - Require a plain function in xpcshell setInterruptCallback. r=bholley
The head_watchdog.js test always calls this with a function argument. This lets us use JSAutoRealm instead of JSAutoRealmAllowCCW.
2018-08-02 09:15:41 +02:00
Tooru Fujisawa
6d85c982d8 Bug 1317481 - Optimize away Generator/Promise handling for await in the topmost JS frame with already resolved/rejected Promise. r=anba,smaug 2018-08-02 16:11:57 +09:00
Jan de Mooij
51c1609621 Bug 1479363 part 6 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in js/xpconnect/loader. r=kmag 2018-08-02 08:49:10 +02:00
Nicholas Nethercote
6f95417fb4 Bug 1478879 - Remove Range/Enum use in XPConnect. r=mccr8
--HG--
extra : rebase_source : 2117904e70e05e318e2b13a5653f029dfdbed851
2018-07-31 10:31:00 +10:00
Nicholas Nethercote
93bbf0be8b Bug 1478879 - Remove Range/Enum use in devtools/. r=sfink
--HG--
extra : rebase_source : 6ebdd04529e347cc47235355e952f6d59b796383
2018-07-31 10:31:00 +10:00
Nicholas Nethercote
66663fc5fa Bug 1478879 - Remove Range/Enum use in testHashTable.cpp. r=luke
--HG--
extra : rebase_source : 0c1b07d4bbac889c686d95ce0d1182835cb119a6
2018-07-27 12:18:50 +10:00