Commit Graph

3035 Commits

Author SHA1 Message Date
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
Philip Chimento
db8f1802f1 Bug 1590907 - Add safeguard when JS_BITS_PER_WORD affects struct layout. r=sfink
This should specifically prevent bug 1553938 from happening in the
future. Unfortunately it won't prevent other similar bugs from
happening.

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

--HG--
extra : moz-landing-system : lando
2019-11-26 07:26:45 +00:00
Philip Chimento
46313a101e Bug 1590907 - Make ENABLE_INTL_API and ENABLE_TYPED_OBJECTS into js-config macros. r=sfink,firefox-build-system-reviewers,mshal
Whether ENABLE_INTL_API and ENABLE_TYPED_OBJECTS are defined, affects
the behaviour of JS_FOR_PROTOTYPES for the prototypes of Intl and
TypedObject. Therefore, these macros have to be available to embedders.
Rename them to JS_HAS_INTL_API and JS_HAS_TYPED_OBJECTS (in line with
the existing JS_HAS_CTYPES) everywhere they are used, and add them to
js-config.h.in.

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

--HG--
extra : moz-landing-system : lando
2019-11-26 07:25:35 +00:00
Philip Chimento
60223e4965 Bug 1590907 - Remove preprocessor dependence from size of ContextOptions. r=sfink
Previously, if SpiderMonkey embedders linked to a copy of libmozjs built
with --enable-cranelift, --enable-wasm-gc, or --enable-fuzzing, then the
size of the ContextOptions data structure declared in the header file
would be different than the size of ContextOptions in the library,
likely leading to crashes. This makes all members of ContextOptions
independent of preprocessor macros. Any options not compiled into
SpiderMonkey will still be no-ops.

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

--HG--
extra : moz-landing-system : lando
2019-11-26 07:25:22 +00:00
Philip Chimento
dda8b08621 Bug 1590907 - Stop configure macros from masking function prototypes in public JS headers. r=jwalden,sfink
We should have the same public API available whenever possible, and make
it a no-op or make it throw immediately if JS was built without support
for it, instead of showing or hiding the API in header files using
configure macros. Otherwise embedders can easily get mismatches between
a library with functionality and header files without it, or vice versa.

There was no good reason why JS_GetErrorType() was nightly-only API, so
this also enables it unconditionally.

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

--HG--
extra : moz-landing-system : lando
2019-11-26 10:27:27 +00:00
Brindusan Cristian
3e0cb96b6e Backed out 7 changesets (bug 1590907) for build bustages at jsfriendapi.cpp. CLOSED TREE
Backed out changeset d6ac9325cb2c (bug 1590907)
Backed out changeset fc85ee5e144c (bug 1590907)
Backed out changeset 1b5b40dcaac4 (bug 1590907)
Backed out changeset 1b2d91f00be2 (bug 1590907)
Backed out changeset 67f939760329 (bug 1590907)
Backed out changeset 4d5818a72b46 (bug 1590907)
Backed out changeset 308b42f3a99c (bug 1590907)

--HG--
extra : rebase_source : 47578231d4749f023c3d206c479ee532dbf6fc6c
extra : histedit_source : 9e7427349342272e7fbe02fee29cb87cda45f75d
2019-11-26 05:23:11 +02:00
Philip Chimento
da9351f561 Bug 1590907 - Add safeguard when JS_BITS_PER_WORD affects struct layout. r=sfink
This should specifically prevent bug 1553938 from happening in the
future. Unfortunately it won't prevent other similar bugs from
happening.

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

--HG--
extra : moz-landing-system : lando
2019-11-26 02:02:58 +00:00
Philip Chimento
a710bbae5d Bug 1590907 - Make ENABLE_INTL_API and ENABLE_TYPED_OBJECTS into js-config macros. r=sfink,firefox-build-system-reviewers,mshal
Whether ENABLE_INTL_API and ENABLE_TYPED_OBJECTS are defined, affects
the behaviour of JS_FOR_PROTOTYPES for the prototypes of Intl and
TypedObject. Therefore, these macros have to be available to embedders.
Rename them to JS_HAS_INTL_API and JS_HAS_TYPED_OBJECTS (in line with
the existing JS_HAS_CTYPES) everywhere they are used, and add them to
js-config.h.in.

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

--HG--
extra : moz-landing-system : lando
2019-11-26 02:02:23 +00:00
Philip Chimento
28a552a99b Bug 1590907 - Remove preprocessor dependence from size of ContextOptions. r=sfink
Previously, if SpiderMonkey embedders linked to a copy of libmozjs built
with --enable-cranelift, --enable-wasm-gc, or --enable-fuzzing, then the
size of the ContextOptions data structure declared in the header file
would be different than the size of ContextOptions in the library,
likely leading to crashes. This makes all members of ContextOptions
independent of preprocessor macros. Any options not compiled into
SpiderMonkey will still be no-ops.

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

--HG--
extra : moz-landing-system : lando
2019-11-26 02:01:46 +00:00
Philip Chimento
1ccf7df721 Bug 1590907 - Stop configure macros from masking function prototypes in public JS headers. r=jwalden,sfink
We should have the same public API available whenever possible, and make
it a no-op or make it throw immediately if JS was built without support
for it, instead of showing or hiding the API in header files using
configure macros. Otherwise embedders can easily get mismatches between
a library with functionality and header files without it, or vice versa.

There was no good reason why JS_GetErrorType() was nightly-only API, so
this also enables it unconditionally.

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

--HG--
extra : moz-landing-system : lando
2019-11-26 02:00:58 +00:00
André Bargull
8e0ef36914 Bug 1568903 - Part 4: Implement AggregateError for Nightly. r=jorendorff
Adds AggregateError, but only enables it for Nightly builds, because the draft
proposal is still incomplete, so it doesn't make sense to let this feature ride
the trains at this moment.

- The `other_error_properties` array was changed to individual static variables,
because AggregateError has more than three properties, which prevents it to be
stored in `JSPropertySpec[][3]`.

- `AggregateErrorObject` can't use the normal `ErrorObject` class, because it
needs an additional slot for the [[AggregateErrors]].

- For similar reasons it can't use the shared `Error` constructor function,
because the `AggregateError` constructor has an additional `errors` iterable
argument which it needs to process.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 18:12:56 +00:00
Tooru Fujisawa
c66f627242 Bug 1597153 - Part 1: Add JS::BinASTFormat enum and use it in API. r=Yoric
Differential Revision: https://phabricator.services.mozilla.com/D53365

--HG--
extra : moz-landing-system : lando
2019-11-22 14:18:41 +00:00
Jan de Mooij
225c67f016 Bug 1595476 part 5 - Remove now-dead CFG memory reporter. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D52637

--HG--
extra : moz-landing-system : lando
2019-11-20 14:40:45 +00:00
Noemi Erli
510357cec1 Backed out 5 changesets (bug 1595476) for causing memory leaks CLOSED TREE
Backed out changeset f38ea7496f7f (bug 1595476)
Backed out changeset e13e5cc4e2e7 (bug 1595476)
Backed out changeset 22b1766f2fd1 (bug 1595476)
Backed out changeset 97633eed11db (bug 1595476)
Backed out changeset 0c9fc36b5c6e (bug 1595476)
2019-11-20 16:35:53 +02:00
Jan de Mooij
3f9a4cdc58 Bug 1595476 part 5 - Remove now-dead CFG memory reporter. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D52637

--HG--
extra : moz-landing-system : lando
2019-11-20 10:48:02 +00:00
Jon Coppeard
7f1bdef148 Bug 1597328 - Replace use of the name kid/kids in Shape classes with the more usual child/children r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D53786

--HG--
extra : moz-landing-system : lando
2019-11-20 11:56:16 +00:00
Jon Coppeard
b9540d5e60 Bug 1597321 - Implement MutableWrappedPtrOperations for JS::Value in terms of Wrapper::set r=sfink
Depends on D53694

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

--HG--
extra : moz-landing-system : lando
2019-11-19 23:40:02 +00:00
Jon Coppeard
b1a0ebc87a Bug 1597321 - Remove boolean result from Value::set operations r=jandem
I don't know why these methods return a boolean, but I can't find any uses of it so I removed it.

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

--HG--
extra : moz-landing-system : lando
2019-11-19 07:21:46 +00:00
André Bargull
1b62966316 Bug 1595745 - Part 16: Remove old-style initialisation for ProtoKey constructors. r=mgaudet
All JSProtoKey entries are now using `InitViaClassSpec`, so we can remove the 'init'
parameter from `JS_FOR_PROTOTYPES` and update all callers accordingly. Furthermore
the `protoTable` array can be changed to an array of `JSClass*` and
`GlobalObject::resolveConstructor` can be cleaned-up to always use the ClassSpec
initialisation path.

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

--HG--
extra : moz-landing-system : lando
2019-11-19 11:05:44 +00:00
André Bargull
d187c806ea Bug 1595745 - Part 15: Change WebAssembly to use ClassSpec. r=mgaudet
Also use ClassSpec initialisation for all WebAssembly namespace constructors
to ensure a failed initialisation can still be retried.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 17:44:36 +00:00
André Bargull
c51a6f618a Bug 1595745 - Part 14: Change AsyncGeneratorFunction to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D52680

--HG--
extra : moz-landing-system : lando
2019-11-15 17:44:19 +00:00
André Bargull
aacc1f6c9c Bug 1595745 - Part 13: Change AsyncFunction to use ClassSpec. r=mgaudet
Update AsyncFunction similar to the changes performed in part 13.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 17:43:53 +00:00
André Bargull
57ec43f43c Bug 1595745 - Part 12: Change GeneratorFunction to use ClassSpec. r=mgaudet
The "constructor" property of the GeneratorFunction prototype is non-writable,
so we need to manually adjust the property attributes in the `FinishClassInitOp`.
This change needs to happen first to ensure "constructor" is still stored in
the last property, which in turn ensures the property can be modified without
triggering a transition into dictionary mode.


jsapi.cpp:
Remove the JSProto_GeneratorFunction special cases now that we can use
`ClassSpec::DontDefineConstructor`.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 17:43:30 +00:00
André Bargull
4be8805674 Bug 1595745 - Part 11: Change TypedObject to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D52667

--HG--
extra : moz-landing-system : lando
2019-11-15 17:43:10 +00:00
André Bargull
8d8f78e33b Bug 1595745 - Part 10: Change Proxy to use ClassSpec. r=mgaudet
Proxy JSClasses are defined through a special macro (`PROXY_CLASS_DEF`), which
ensures all Proxy related bits are set correctly. The macro doesn't allow to
specify a ClassSpec, so we need to add a new macro which supports that
functionality.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 17:42:55 +00:00
André Bargull
dfc558b12e Bug 1595745 - Part 9: Change Intl to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D52665

--HG--
extra : moz-landing-system : lando
2019-11-15 17:42:45 +00:00
André Bargull
cc20d25168 Bug 1595745 - Part 8: Change Reflect to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D52664

--HG--
extra : moz-landing-system : lando
2019-11-15 17:42:38 +00:00
André Bargull
224a88dfbe Bug 1595745 - Part 7: Change Atomics to use ClassSpec. r=mgaudet
Similar changes like in part 5, only now for the Atomics object.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 17:42:36 +00:00
André Bargull
09bd4eec3f Bug 1595745 - Part 6: Change Math to use ClassSpec. r=mgaudet
Similar to the JSON changes in part 5. Additionally 'FinishClassInitOp' is
needed to initialise the double constant properties.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 17:42:34 +00:00
André Bargull
0d959418d5 Bug 1595745 - Part 5: Change JSON to use ClassSpec. r=mgaudet
The JSON ClassSpec uses a custom 'createConstructor', because the JSON object
is a singleton object and not a built-in constructor function.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 17:41:01 +00:00
André Bargull
3bb9fb0598 Bug 1595745 - Part 4: Change Symbol to use ClassSpec. r=mgaudet
A ClassSpec's 'FinishClassInitOp' isn't called when `InitBareBuiltinCtor` is
used, which allows us to unconditionally define all well-known symbols in
`SymbolClassFinish`. That means we no longer need the separate `InitBareSymbolCtor`
function.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 17:40:43 +00:00
André Bargull
ecb8f7ebce Bug 1595745 - Part 3: Change String to use ClassSpec. r=mgaudet
Move String to ClassSpec using similar changes like done for Number in part 2.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 17:40:20 +00:00
André Bargull
8044c06dcf Bug 1595745 - Part 2: Change Number to use ClassSpec. r=mgaudet
In addition to a custom 'createProperty' hook, the Number ClassSpec also uses
a 'FinishClassInitOp' to initialise Number-related global properties like
`isNaN` and to initialise functions which are shared between Number and the
global object (i.e. `parseInt`).

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

--HG--
extra : moz-landing-system : lando
2019-11-15 17:40:00 +00:00
André Bargull
54967da1df Bug 1595745 - Part 1: Change Boolean to use ClassSpec. r=mgaudet
Boolean.prototype is itself a Boolean object, so the ClassSpec needs to use
a custom 'createPrototype' function to create and initialise the prototype
object.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 17:39:37 +00:00
Matthew Gaudet
a1ba26166a Bug 1596603 - Add [SMDOC] to jsid comment r=tcampbell DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D53106

--HG--
extra : moz-landing-system : lando
2019-11-15 16:49:08 +00:00
Steve Fink
0a8fd13f71 Bug 1593399 - Rework how mark colors are handled in weakmap marking r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D51492

--HG--
extra : moz-landing-system : lando
2019-11-15 16:40:44 +00:00
Cosmin Sabou
bc322e0381 Backed out 16 changesets (bug 1595745) for spidermonkey bustages on testWasm.cpp. CLOSED TREE
Backed out changeset 3b5c6aaf5a18 (bug 1595745)
Backed out changeset 8e8c4124f219 (bug 1595745)
Backed out changeset de5c2cca64c6 (bug 1595745)
Backed out changeset b11677f10f9d (bug 1595745)
Backed out changeset 2ce96c6187c2 (bug 1595745)
Backed out changeset e089ebe699d2 (bug 1595745)
Backed out changeset a514661afdda (bug 1595745)
Backed out changeset 29ec5ccb4adf (bug 1595745)
Backed out changeset 3b0e242d762a (bug 1595745)
Backed out changeset fef5c8d5cb90 (bug 1595745)
Backed out changeset 68c5cdced300 (bug 1595745)
Backed out changeset d5f5e9091fb0 (bug 1595745)
Backed out changeset 6c917c2ca4a7 (bug 1595745)
Backed out changeset 338ad438e066 (bug 1595745)
Backed out changeset 61d25028669b (bug 1595745)
Backed out changeset f082e5173ed4 (bug 1595745)
2019-11-15 18:17:31 +02:00
André Bargull
4f9534a8ce Bug 1595745 - Part 16: Remove old-style initialisation for ProtoKey constructors. r=mgaudet
All JSProtoKey entries are now using `InitViaClassSpec`, so we can remove the 'init'
parameter from `JS_FOR_PROTOTYPES` and update all callers accordingly. Furthermore
the `protoTable` array can be changed to an array of `JSClass*` and
`GlobalObject::resolveConstructor` can be cleaned-up to always use the ClassSpec
initialisation path.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 15:54:19 +00:00
André Bargull
781023effd Bug 1595745 - Part 15: Change WebAssembly to use ClassSpec. r=mgaudet
Also use ClassSpec initialisation for all WebAssembly namespace constructors
to ensure a failed initialisation can still be retried.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 15:28:12 +00:00
André Bargull
eef879a287 Bug 1595745 - Part 14: Change AsyncGeneratorFunction to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D52680

--HG--
extra : moz-landing-system : lando
2019-11-15 15:06:18 +00:00
André Bargull
fab0ea3941 Bug 1595745 - Part 13: Change AsyncFunction to use ClassSpec. r=mgaudet
Update AsyncFunction similar to the changes performed in part 13.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 15:05:58 +00:00
André Bargull
2777f45108 Bug 1595745 - Part 12: Change GeneratorFunction to use ClassSpec. r=mgaudet
The "constructor" property of the GeneratorFunction prototype is non-writable,
so we need to manually adjust the property attributes in the `FinishClassInitOp`.
This change needs to happen first to ensure "constructor" is still stored in
the last property, which in turn ensures the property can be modified without
triggering a transition into dictionary mode.


jsapi.cpp:
Remove the JSProto_GeneratorFunction special cases now that we can use
`ClassSpec::DontDefineConstructor`.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 15:54:45 +00:00
André Bargull
6f59566543 Bug 1595745 - Part 11: Change TypedObject to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D52667

--HG--
extra : moz-landing-system : lando
2019-11-15 15:05:10 +00:00
André Bargull
34c067eaa6 Bug 1595745 - Part 10: Change Proxy to use ClassSpec. r=mgaudet
Proxy JSClasses are defined through a special macro (`PROXY_CLASS_DEF`), which
ensures all Proxy related bits are set correctly. The macro doesn't allow to
specify a ClassSpec, so we need to add a new macro which supports that
functionality.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 15:55:26 +00:00
André Bargull
0caf0ad446 Bug 1595745 - Part 9: Change Intl to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D52665

--HG--
extra : moz-landing-system : lando
2019-11-15 15:04:27 +00:00
André Bargull
a4bc428225 Bug 1595745 - Part 8: Change Reflect to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D52664

--HG--
extra : moz-landing-system : lando
2019-11-15 15:04:02 +00:00
André Bargull
4acd45cff3 Bug 1595745 - Part 7: Change Atomics to use ClassSpec. r=mgaudet
Similar changes like in part 5, only now for the Atomics object.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 15:03:42 +00:00
André Bargull
563f03bb43 Bug 1595745 - Part 6: Change Math to use ClassSpec. r=mgaudet
Similar to the JSON changes in part 5. Additionally 'FinishClassInitOp' is
needed to initialise the double constant properties.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 15:03:20 +00:00
André Bargull
11d51353e1 Bug 1595745 - Part 5: Change JSON to use ClassSpec. r=mgaudet
The JSON ClassSpec uses a custom 'createConstructor', because the JSON object
is a singleton object and not a built-in constructor function.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 15:02:53 +00:00
André Bargull
ec168eb8c2 Bug 1595745 - Part 4: Change Symbol to use ClassSpec. r=mgaudet
A ClassSpec's 'FinishClassInitOp' isn't called when `InitBareBuiltinCtor` is
used, which allows us to unconditionally define all well-known symbols in
`SymbolClassFinish`. That means we no longer need the separate `InitBareSymbolCtor`
function.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 15:02:44 +00:00
André Bargull
862270eda3 Bug 1595745 - Part 3: Change String to use ClassSpec. r=mgaudet
Move String to ClassSpec using similar changes like done for Number in part 2.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 15:02:35 +00:00
André Bargull
c0763fac0e Bug 1595745 - Part 2: Change Number to use ClassSpec. r=mgaudet
In addition to a custom 'createProperty' hook, the Number ClassSpec also uses
a 'FinishClassInitOp' to initialise Number-related global properties like
`isNaN` and to initialise functions which are shared between Number and the
global object (i.e. `parseInt`).

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

--HG--
extra : moz-landing-system : lando
2019-11-15 15:00:39 +00:00
André Bargull
8f9c68599f Bug 1595745 - Part 1: Change Boolean to use ClassSpec. r=mgaudet
Boolean.prototype is itself a Boolean object, so the ClassSpec needs to use
a custom 'createPrototype' function to create and initialise the prototype
object.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 14:59:59 +00:00
Nazım Can Altınova
8f6754f6fc Bug 1468789 - Part 2: Collect inner window id information for js interpreter frames and add a mechanism to get that for jit frames r=gerald,jandem,mstange
Differential Revision: https://phabricator.services.mozilla.com/D51860

--HG--
extra : moz-landing-system : lando
2019-11-15 08:01:30 +00:00
Nazım Can Altınova
bc87c9100f Bug 1468789 - Part 1: Add window id inside realm creation options. r=jandem,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D51859

--HG--
extra : moz-landing-system : lando
2019-11-14 12:26:25 +00:00
Noemi Erli
0165e36c21 Backed out 10 changesets (bug 1568903) for causing mochitest failures
Backed out changeset 76ad398222a6 (bug 1568903)
Backed out changeset f4d9fda6d7f2 (bug 1568903)
Backed out changeset 379d0f2de211 (bug 1568903)
Backed out changeset 3f4aee7f2893 (bug 1568903)
Backed out changeset 595accbef95e (bug 1568903)
Backed out changeset 567d497a39f4 (bug 1568903)
Backed out changeset 127a44494b67 (bug 1568903)
Backed out changeset 27c54b414c35 (bug 1568903)
Backed out changeset d2b01a1ad0a9 (bug 1568903)
Backed out changeset 58c002a9cb78 (bug 1568903)
2019-11-15 13:50:40 +02:00
André Bargull
e2c7581d9d Bug 1568903 - Part 4: Implement AggregateError for Nightly. r=jorendorff
Adds AggregateError, but only enables it for Nightly builds, because the draft
proposal is still incomplete, so it doesn't make sense to let this feature ride
the trains at this moment.

- The `other_error_properties` array was changed to individual static variables,
because AggregateError has more than three properties, which prevents it to be
stored in `JSPropertySpec[][3]`.

- `AggregateErrorObject` can't use the normal `ErrorObject` class, because it
needs an additional slot for the [[AggregateErrors]].

- For similar reasons it can't use the shared `Error` constructor function,
because the `AggregateError` constructor has an additional `errors` iterable
argument which it needs to process.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 10:29:30 +00:00
Jan de Mooij
72d7c72f56 Bug 1594054 - Move ExecutableAllocator from JitRuntime to JitZone. r=jonco,erahm
This matches the JitCode GC-thing lifetime and will hopefully help avoid
fragmentation.

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

--HG--
extra : moz-landing-system : lando
2019-11-14 10:20:02 +00:00
Doug Thayer
97c5d40384 Bug 1586920 - Sometimes include dynamic string of label frames in BHR r=nika
This adds two AUTO_PROFILER_LABEL_DYNAMIC_... macros and updates select
usages of the old macros to use the new ones. These new macros cause
the dynamic string of the label to be included in BHR stacks.

We don't want to do this all of the time, as in many cases we may not
be interested enough in the dynamic string or it may be sensitive
information, but it is rather important information for certain cases.

This uses the same buffer that we use for the strings for JS frames,
and if we fail to fit into that buffer we just append the raw label.

If the string is too long for our static buffer (128 bytes), we just
leave it truncated, as it should be stable and we may be able to infer
from the truncated form what the full form would be.

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

--HG--
extra : moz-landing-system : lando
2019-11-11 20:27:44 +00:00
Cosmin Sabou
a055b60f76 Backed out changeset 8daa186bd18b (bug 1593399) for causing crashes @js::gcstats::Statistics. CLOSED TREE 2019-11-13 07:00:37 +02:00
Philip Chimento
b90e70a466 Bug 1590907 - Remove obsolete macro JS_OOM_DO_BACKTRACES. r=sfink
This macro isn't defined anywhere and doesn't seem to do anything. It
affects the oom-backtraces property of the build configuration object in
the testing functions, but since the macro is never defined, it seems to
be always set to false anyway, so just hardcode it.

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

--HG--
extra : moz-landing-system : lando
2019-11-12 22:01:06 +00:00
Philip Chimento
c6f2907808 Bug 1590907 - Remove obsolete macro ENABLE_SHARED_ARRAY_BUFFER. r=sfink
This macro is not defined anywhere and has no effect in the end whether
it's defined or not.

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

--HG--
extra : moz-landing-system : lando
2019-11-12 21:58:55 +00:00
Steve Fink
3f8b1d909a Bug 1593399 - Rework how mark colors are handled in weakmap marking r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D51492

--HG--
extra : moz-landing-system : lando
2019-11-12 22:24:29 +00:00
Cosmin Sabou
f155bb6137 Backed out changeset de7a1a1b75f0 (bug 1593399) for build bustages on WeakMap-inl.h.
--HG--
extra : histedit_source : a6d4ee525d48086f5981f13d95eba2b2e3019262
2019-11-12 22:34:58 +02:00
Steve Fink
b3059609b0 Bug 1593399 - Rework how mark colors are handled in weakmap marking r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D51492

--HG--
extra : moz-landing-system : lando
2019-11-12 19:54:06 +00:00
André Bargull
a1298a12f9 Bug 1592992 - Part 19: Move jsutil.cpp to util/Utility.cpp. r=jonco
This file provides the implementation of js/Utility.h, so it should be renamed
to match the header name.

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

--HG--
rename : js/src/jsutil.cpp => js/src/util/Utility.cpp
extra : moz-landing-system : lando
2019-11-08 13:24:15 +00:00
Jon Coppeard
72de7c7261 Bug 1593260 - Don't use remove_if for sweeping GCVector as the predicate can modify the elements r=anba
Differential Revision: https://phabricator.services.mozilla.com/D51786

--HG--
extra : moz-landing-system : lando
2019-11-05 15:42:19 +00:00
Jeff Walden
373e83663e Bug 1582348 - Make WritableStreamDefault{Controller,Writer} real classes, and resolve them only when writable streams have been enabled. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D51047

--HG--
extra : moz-landing-system : lando
2019-11-05 05:12:15 +00:00
André Bargull
11c3c57ab3 Bug 1531716 - Part 4: Replace jstypes macros with constexpr functions. r=jonco
JS_BIT and JS_BITMASK are only used in contexts where uint32_t is used, so these
two functions are now typed to accept and return uint32_t.

JS_HOWMANY and the three JS_ROUND functions are only used with size_t inputs,
so these four functions are now typed to accept and return size_t.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 14:04:35 +00:00
Jon Coppeard
f3b48418af Bug 1587096 - Part 3: Implmement FinalizationGroup r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D49946

--HG--
extra : moz-landing-system : lando
2019-11-01 10:37:47 +00:00
Jon Coppeard
b7b220ece8 Bug 1587096 - Part 2: Add an API to set the HostCleanupFinalizationGroup callback r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D49944

--HG--
extra : moz-landing-system : lando
2019-11-01 10:37:40 +00:00
Jon Coppeard
4dd3d1c903 Bug 1587096 - Part 1: Add JS FinalizationGroupObject and related data structures r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D49943

--HG--
extra : moz-landing-system : lando
2019-11-01 10:37:25 +00:00
Jon Coppeard
360fa579c4 Bug 1587098 - Add a shell option to enable support for weak references, off by default r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D49942

--HG--
extra : moz-landing-system : lando
2019-11-01 10:37:09 +00:00
Jeff Walden
5da49ed3d7 Bug 1582348 - Implement |WritableStreamDefaultControllerClose|. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D50099

--HG--
extra : moz-landing-system : lando
2019-10-30 22:35:28 +00:00
Gurzau Raul
6728c0b9a9 Backed out 7 changesets (bug 1582348) for spidermonkey bustage at WritableStream.cpp on a CLOSED TREE.
Backed out changeset 912867da0987 (bug 1582348)
Backed out changeset 7d5a91059cc9 (bug 1582348)
Backed out changeset 98fda09d6d39 (bug 1582348)
Backed out changeset 7e6bd57c4493 (bug 1582348)
Backed out changeset 62bbc891288f (bug 1582348)
Backed out changeset 17992c3dd43e (bug 1582348)
Backed out changeset 461556631684 (bug 1582348)
2019-10-30 07:46:31 +02:00
Jeff Walden
2f5c0aed74 Bug 1582348 - Implement |WritableStreamDefaultControllerClose|. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D50099

--HG--
extra : moz-landing-system : lando
2019-10-30 05:00:24 +00:00
Ted Campbell
2d736289c2 Bug 1592051 - Mark GCCellPtr as JS_HAZ_GC_POINTER. r=sfink
This also fixes two inconsequential hazards.

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

--HG--
extra : moz-landing-system : lando
2019-10-28 18:22:42 +00:00
Philip Chimento
1fab6fc78e Bug 1426865 - Add default visibility to JSAPI symbols. r=sfink
Depends on D49098

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

--HG--
extra : moz-landing-system : lando
2019-10-27 22:34:11 +00:00
Philip Chimento
fd8bc56c8d Bug 1426865 - Remove JS_BROKEN_GCC_ATTRIBUTE_WARNING. r=sfink
This macro makes any forward declarations unnecessarily verbose, and the
build system uses Clang by default anyway, except in the hazard analysis
which already specified -Wno-attributes.

Depends on D49097

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

--HG--
extra : moz-landing-system : lando
2019-10-27 22:34:11 +00:00
Jeff Walden
3e64c882fe Bug 1591655 - Remove the unnecessary |proto| argument from |JS::NewPromiseObject| and its callers, seeing as all callers pass |nullptr| (and therefore uniformly request the default prototype). r=jandem,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D50695

--HG--
extra : moz-landing-system : lando
2019-10-26 08:14:05 +00:00
Jon Coppeard
e9bd719e91 Bug 1591338 - Add a JS API to call a object's finalizer r=mccr8
This replaces a direct call of an object's finalizer with a more formal API. This adds some assertions and passes a valid FreeOp pointer to the finalizer rather than null.

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

--HG--
extra : moz-landing-system : lando
2019-10-25 15:33:52 +00:00
Philip Chimento
81983bd6e5 Bug 1590845 - Add JS::MemoryUse::Embedding1 through 5. r=tcampbell,jonco
This makes JS::AddAssociatedMemory() and JS::RemoveAssociatedMemory()
more useful for embedders.

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

--HG--
extra : moz-landing-system : lando
2019-10-24 16:50:59 +00:00
Jan de Mooij
7b85f15477 Bug 1590776 - Store the external-string-sizeOf callback with the finalize callback instead of per-runtime. r=jwalden,bzbarsky
This renames the JSStringFinalizer struct to JSExternalStringCallbacks,
makes it a virtual class, and adds a size-of callback to it (to replace
the per-runtime callback).

This will make it possible to implement this callback easily for the
NewExternalString testing function (which we want for bug 1590641)
without having to move this testing function to shell/js.cpp

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

--HG--
extra : moz-landing-system : lando
2019-10-24 08:49:39 +00:00
Tom Tung
f24d6deaf7 Bug 1583251 - P3 - Check if it is okay to allow shared memory while deserializing; r=nika,lth
Differential Revision: https://phabricator.services.mozilla.com/D48349

--HG--
extra : moz-landing-system : lando
2019-10-23 07:20:18 +00:00
Tom Tung
a0d1f674b6 Bug 1583251 - P2 - Fix some format nits or naming nits for StructuredClone::Write; r=nika,lth
Differential Revision: https://phabricator.services.mozilla.com/D48348

--HG--
extra : moz-landing-system : lando
2019-10-23 07:20:05 +00:00
Jon Coppeard
d1664d884b Bug 1589717 - Simplify GCVector::sweep and allow use with element types that don't have barriers r=sfink
We can simplify this method by using std::remove_if, which does the shifting down of removed elements for us. We just need to make sure all our wrapper classes support moving assignment.

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

--HG--
extra : moz-landing-system : lando
2019-10-22 04:58:53 +00:00
Jim Porter
9354dfda4a Bug 1557447 - Profiler support for IPC information; r=nika,smaug
This adds the ability to add profile markers for both the sender and recipient
sides of IPC messages. These can then be correlated with one another in the
profile visualization. For the UI component of this patch, see
<https://github.com/firefox-devtools/profiler/pull/2172>.

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

--HG--
extra : moz-landing-system : lando
2019-10-21 20:51:07 +00:00
Logan Smyth
18146a6645 Bug 1564177 - Part 2: Move the DebuggerVector from GlobalObject to the Realm. r=jimb
The DebuggerVector has been associated with the GlobalObject via a private slot
referencing a wrapper JS object (DebugggerVectorHolder). Moving this data into
the JS::Realm instance removes complexity and avoids needing the holder.

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

--HG--
extra : moz-landing-system : lando
2019-10-18 20:21:44 +00:00
Razvan Maries
f9d8db28af Backed out 5 changesets (bug 1583251) for rust build bustages. CLOSED TREE
Backed out changeset bfe390ad771b (bug 1583251)
Backed out changeset 0113c698b44d (bug 1583251)
Backed out changeset 248ad59168dd (bug 1583251)
Backed out changeset 5d5e3dc17118 (bug 1583251)
Backed out changeset 9e9eaa78c436 (bug 1583251)
2019-10-18 17:59:20 +03:00
Tom Tung
5ba65c0735 Bug 1583251 - P3 - Check if it is okay to allow shared memory while deserializing; r=nika,lth
Differential Revision: https://phabricator.services.mozilla.com/D48349

--HG--
extra : moz-landing-system : lando
2019-10-15 13:42:25 +00:00
Tom Tung
c291baa433 Bug 1583251 - P2 - Fix some format nits or naming nits for StructuredClone::Write; r=nika,lth
Differential Revision: https://phabricator.services.mozilla.com/D48348

--HG--
extra : moz-landing-system : lando
2019-10-15 13:49:26 +00:00
Daniel Varga
8fdca46bc7 Backed out changeset 2923afce519a (bug 1557447) for browser chrome failure at tools/profiler/tests/browser/browser_test_feature_preferencereads.js. On a CLOSED TREE 2019-10-18 07:54:09 +03:00
Jim Porter
80bfcd6e57 Bug 1557447 - Profiler support for IPC information; r=nika
This adds the ability to add profile markers for both the sender and recipient
sides of IPC messages. These can then be correlated with one another in the
profile visualization. For the UI component of this patch, see
<https://github.com/firefox-devtools/profiler/pull/2172>.

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

--HG--
extra : moz-landing-system : lando
2019-10-18 02:56:02 +00:00
Dorel Luca
efd52379da Backed out changeset cd4dc0ae3364 (bug 1557447) for Browser-chrome failures in build/src/obj-firefox/dist/include/mozilla/BlocksRingBuffer.h 2019-10-18 03:59:06 +03:00
Jim Porter
641b95fb72 Bug 1557447 - Profiler support for IPC information; r=nika
This adds the ability to add profile markers for both the sender and recipient
sides of IPC messages. These can then be correlated with one another in the
profile visualization. For the UI component of this patch, see
<https://github.com/firefox-devtools/profiler/pull/2172>.

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

--HG--
extra : moz-landing-system : lando
2019-10-17 23:39:42 +00:00
André Bargull
0b138ce1ee Bug 1433306 - Part 2: Implement Intl.ListFormat stage 3 proposal. r=jwalden
"disjunction" and "unit" types aren't yet supported, because ICU doesn't
provide a C-API for this functionality. "short" and "narrow" styles aren't
supported for the same reason.

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

--HG--
extra : moz-landing-system : lando
2019-10-16 16:05:06 +00:00
André Bargull
7a5b5e0a24 Bug 1288457 - Part 15: Add JSProtoKey for AsyncGeneratorFunction. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42885

--HG--
extra : moz-landing-system : lando
2019-10-16 12:35:36 +00:00
André Bargull
d80c1ed430 Bug 1288457 - Part 14: Add JSProtoKey for GeneratorFunction. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42884

--HG--
extra : moz-landing-system : lando
2019-10-16 12:35:08 +00:00
André Bargull
966f19f7e0 Bug 1288457 - Part 13: Add JSProtoKey for AsyncFunction. r=mgaudet
In a follow-up bug this will be changed to use `ClassSpec`, along with the rest
of the JSProtoKey classes still using non-ClassSpec initialisation.

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

--HG--
extra : moz-landing-system : lando
2019-10-16 12:34:46 +00:00
André Bargull
70066a6dde Bug 1288457 - Part 9: Assign an additional bit for CACHED_PROTO_KEY. r=mgaudet
Increase the CACHED_PROTO_KEY limit from 2⁶ to 2⁷ to allow that all current
JSProto classes can use JSCLASS_HAS_CACHED_PROTO.

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

--HG--
extra : moz-landing-system : lando
2019-10-16 12:34:06 +00:00
André Bargull
d14b6d410a Bug 1288457 - Part 8: Use constexpr instead of #defines in js/Class. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42877

--HG--
extra : moz-landing-system : lando
2019-10-16 12:34:04 +00:00
André Bargull
c29b895419 Bug 1288457 - Part 6: Change Intl.RelativeTimeFormat to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42875

--HG--
extra : moz-landing-system : lando
2019-10-16 12:53:08 +00:00
André Bargull
d367ed5276 Bug 1288457 - Part 5: Change Intl.PluralRules to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42874

--HG--
extra : moz-landing-system : lando
2019-10-16 12:31:58 +00:00
André Bargull
a10d581508 Bug 1288457 - Part 4: Change Intl.NumberFormat to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42873

--HG--
extra : moz-landing-system : lando
2019-10-16 12:31:34 +00:00
André Bargull
0ec985f2cc Bug 1288457 - Part 3: Change Intl.Locale to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42872

--HG--
extra : moz-landing-system : lando
2019-10-16 12:31:14 +00:00
André Bargull
c598de1fe4 Bug 1288457 - Part 2: Change Intl.DateTimeFormat to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42871

--HG--
extra : moz-landing-system : lando
2019-10-16 12:30:52 +00:00
André Bargull
a5e566d375 Bug 1288457 - Part 1: Change Intl.Collator to use ClassSpec. r=mgaudet
- `JSProto_Collator` has to be added to the end until part 9.
- `js::CreateCollatorPrototype` was renamed to `js::CreateCollator` because it
  no longer returns the prototype object. Part 7 will change this again.
- `CollatorObject::protoClass_` uses `PlainObject::class_`, which works because
  CollatorObject isn't xrayable.

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

--HG--
extra : moz-landing-system : lando
2019-10-16 12:30:29 +00:00
Cosmin Sabou
4c99a834d0 Backed out 19 changesets (bug 1288457) for causing build bbustages on CommonFunctions.h. CLOSED TREE
Backed out changeset e350706464ea (bug 1288457)
Backed out changeset ee723359cd0a (bug 1288457)
Backed out changeset d8176a4b1984 (bug 1288457)
Backed out changeset eafdeb4aaa02 (bug 1288457)
Backed out changeset 8f4cb4f8495c (bug 1288457)
Backed out changeset c13ce7a93ce9 (bug 1288457)
Backed out changeset 82e03558dc9f (bug 1288457)
Backed out changeset 226c1017cdbd (bug 1288457)
Backed out changeset 19625261f55a (bug 1288457)
Backed out changeset c743e9d10ae5 (bug 1288457)
Backed out changeset 13369226eaca (bug 1288457)
Backed out changeset e1a4db22bcb9 (bug 1288457)
Backed out changeset fe1512265c07 (bug 1288457)
Backed out changeset 79af8c3fa894 (bug 1288457)
Backed out changeset 310181e1596b (bug 1288457)
Backed out changeset 4ab734bad124 (bug 1288457)
Backed out changeset 97551047921f (bug 1288457)
Backed out changeset d8b0d1db18b8 (bug 1288457)
Backed out changeset cb587dae4080 (bug 1288457)
2019-10-16 13:36:37 +03:00
André Bargull
f90e196c3b Bug 1288457 - Part 15: Add JSProtoKey for AsyncGeneratorFunction. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42885

--HG--
extra : moz-landing-system : lando
2019-10-15 17:24:13 +00:00
André Bargull
4b52cb793f Bug 1288457 - Part 14: Add JSProtoKey for GeneratorFunction. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42884

--HG--
extra : moz-landing-system : lando
2019-10-15 17:23:45 +00:00
André Bargull
8a73a1e71c Bug 1288457 - Part 13: Add JSProtoKey for AsyncFunction. r=mgaudet
In a follow-up bug this will be changed to use `ClassSpec`, along with the rest
of the JSProtoKey classes still using non-ClassSpec initialisation.

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

--HG--
extra : moz-landing-system : lando
2019-10-15 17:23:23 +00:00
André Bargull
c54ac15c78 Bug 1288457 - Part 9: Assign an additional bit for CACHED_PROTO_KEY. r=mgaudet
Increase the CACHED_PROTO_KEY limit from 2⁶ to 2⁷ to allow that all current
JSProto classes can use JSCLASS_HAS_CACHED_PROTO.

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

--HG--
extra : moz-landing-system : lando
2019-10-15 17:22:08 +00:00
André Bargull
d2f8e95a58 Bug 1288457 - Part 8: Use constexpr instead of #defines in js/Class. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42877

--HG--
extra : moz-landing-system : lando
2019-10-15 17:22:06 +00:00
André Bargull
c0ef62e824 Bug 1288457 - Part 6: Change Intl.RelativeTimeFormat to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42875

--HG--
extra : moz-landing-system : lando
2019-10-15 17:39:17 +00:00
André Bargull
baf0f55458 Bug 1288457 - Part 5: Change Intl.PluralRules to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42874

--HG--
extra : moz-landing-system : lando
2019-10-15 17:20:32 +00:00
André Bargull
f655fe9c03 Bug 1288457 - Part 4: Change Intl.NumberFormat to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42873

--HG--
extra : moz-landing-system : lando
2019-10-15 17:20:15 +00:00
André Bargull
6c9d24ed86 Bug 1288457 - Part 3: Change Intl.Locale to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42872

--HG--
extra : moz-landing-system : lando
2019-10-15 17:19:53 +00:00
André Bargull
9566414194 Bug 1288457 - Part 2: Change Intl.DateTimeFormat to use ClassSpec. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D42871

--HG--
extra : moz-landing-system : lando
2019-10-15 17:19:27 +00:00
André Bargull
b14ab338c7 Bug 1288457 - Part 1: Change Intl.Collator to use ClassSpec. r=mgaudet
- `JSProto_Collator` has to be added to the end until part 9.
- `js::CreateCollatorPrototype` was renamed to `js::CreateCollator` because it
  no longer returns the prototype object. Part 7 will change this again.
- `CollatorObject::protoClass_` uses `PlainObject::class_`, which works because
  CollatorObject isn't xrayable.

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

--HG--
extra : moz-landing-system : lando
2019-10-15 17:19:08 +00:00
Jon Coppeard
a399d6ba14 Bug 1588302 - Move heap state accessors to public/HeapAPI.h r=sfink
jspubtd.h is for type definitions so this moves the heap state functions to somewhere more suitable.

Depends on D49116

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

--HG--
extra : moz-landing-system : lando
2019-10-14 16:45:18 +00:00
Yoshi Cheng-Hao Huang
12589797cc Bug 1573809 - Part 6 : GCHashmap/GCHashTable traceWeak. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D46614

--HG--
extra : moz-landing-system : lando
2019-10-14 09:21:58 +00:00
Jan de Mooij
6febd292ea Bug 1586683 - Remove flat strings from JSAPI. r=jwalden,bzbarsky
We want to remove flat strings (JSFlatString). With this patch we only expose
linear strings (JSLinearString) to API consumers.

This is very mechanical for the most part, because code typically only cares
about linear strings and not the null-termination aspect.

CTypes's Library.cpp has some Windows-specific code where we relied on null-terminated
strings. This patch adds JS_CopyStringCharsZ for that use case.

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

--HG--
extra : moz-landing-system : lando
2019-10-14 09:32:07 +00:00
André Bargull
56d3b81c51 Bug 1570370 - Part 4: Rename NativeLocaleObject to LocaleObject. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D40070

--HG--
extra : moz-landing-system : lando
2019-10-11 20:06:32 +00:00
André Bargull
46828c7015 Bug 1570370 - Part 2: Port Intl.Locale to C++. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D40068

--HG--
extra : moz-landing-system : lando
2019-10-11 19:24:41 +00:00
Jon Coppeard
f88eca81a5 Bug 1585921 - Use root marking functions to trace unbarriered pointers in GCPolicy traits since this is only safe when we're marking roots r=sfink
The root marking functions have assertions that will catch this being used outside of heap marking.

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

--HG--
extra : moz-landing-system : lando
2019-10-09 10:30:02 +00:00
Jon Coppeard
f5b3722028 Bug 1585921 - Remove unnecessary static trace methods which are never called r=sfink
GCPolicy<T> calls the instance method for these types so these static methods aren't required.

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

--HG--
extra : moz-landing-system : lando
2019-10-09 10:27:15 +00:00
Tom Ritter
117e232bdc Bug 1576254 - Add isSystemOrAddonPrincipal to JSPrincipal and nsJSPrincipals r=luke
Finally, here we add the virtual method isSystemOrAddonPrincipal to the
JSPrincipal object.

We also add it to nsJSPrincipal (where it has an easy implementation), and
to carry classes that are used by JS tests and the shell.

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

--HG--
extra : moz-landing-system : lando
2019-10-04 17:37:36 +00:00
Tom Ritter
754ebbc4d7 Bug 1576254 - Add a wasmForTrustedPrinciples bool onto ContextOptions that (currently) behaves the exact same as the wasm bool r=luke
In a future commit we will tie this boolean to its own preference value, but here we
initialize it with the same value as the wasm boolean.

We also update wasm::HasSupport to check the to-be-added isSystemOrAddonPrincipal()
method on JSPrincipals to determine which member (wasm or wasmForTrustedPrinciples)
to consult.

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

--HG--
extra : moz-landing-system : lando
2019-10-04 17:35:46 +00:00
Tom Ritter
206eea6eb4 Bug 1576254 - Move Clamping and Jittering from RealmCreationOptions to Behaviors r=luke
CreationOptions are intended to be immutable and not change during realm operation.
Behaviors change, and clamping/jittering should reside on behaviors.

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

--HG--
extra : moz-landing-system : lando
2019-10-04 17:35:26 +00:00
Paul Bone
ba0077d908 Bug 1530251 - Rename DefaultNurseryBytes -> DefaultNurseryMaxBytes r=jonco
Also:
 * Update the DefaultNurseryMaxBytes comment
 * Fix the shell parameter handling.

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

--HG--
extra : moz-landing-system : lando
2019-10-03 05:51:28 +00:00
Bogdan Tara
f9d30e06a7 Backed out 2 changesets (bug 1530251) for rust failures CLOSED TREE
Backed out changeset e03401a358a6 (bug 1530251)
Backed out changeset 42913778b66a (bug 1530251)
2019-10-02 14:49:23 +03:00
Paul Bone
5415399846 Bug 1530251 - Rename DefaultNurseryBytes -> DefaultNurseryMaxBytes r=jonco
Also:
 * Update the DefaultNurseryMaxBytes comment
 * Fix the shell parameter handling.

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

--HG--
extra : moz-landing-system : lando
2019-10-02 11:25:40 +00:00
Boris Zbarsky
773e6fd997 Bug 1584431 part 1. Add a way to call js::StringEqualsAscii with a known length. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D47390

--HG--
extra : moz-landing-system : lando
2019-09-28 04:24:46 +00:00
Jeff Walden
bc8075d8e4 Bug 1582348 - Fill out the body of |SetUpWritableStreamDefaultController|. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D46403

--HG--
extra : moz-landing-system : lando
2019-09-28 03:16:16 +00:00
Dorel Luca
0027809f96 Backed out 6 changesets (bug 1582348) for build bustage in streams/WritableStreamOperations.cpp
Backed out changeset bb2e05de0638 (bug 1582348)
Backed out changeset c5b476005983 (bug 1582348)
Backed out changeset 0d8e86bb06d0 (bug 1582348)
Backed out changeset 7628d3f14514 (bug 1582348)
Backed out changeset 728075c80f4d (bug 1582348)
Backed out changeset 4ceb625e5eb0 (bug 1582348)
2019-09-28 04:22:58 +03:00
Jeff Walden
96ad82e40d Bug 1582348 - Fill out the body of |SetUpWritableStreamDefaultController|. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D46403

--HG--
extra : moz-landing-system : lando
2019-09-28 01:01:15 +00:00
Ted Campbell
12e0243df6 Bug 1547824 - Add Value::unboxGCPointer helper for JS::Value. r=iain
Abstracts the pointer unboxing pattern for both NUNBOX32 and PUNBOX64
formats. This also encapsulates some of the spectre mitigations.

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

--HG--
extra : moz-landing-system : lando
2019-09-19 23:56:53 +00:00
Ted Campbell
6e05e62cb0 Bug 1547824 - Change JS::Value from union to class. r=jwalden
Now that all the bad type-punning is gone, JS::Value has a single
asBits_ field and we should use a class aggregate type instead.

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

--HG--
extra : moz-landing-system : lando
2019-09-19 23:56:55 +00:00
Ted Campbell
86d5bde949 Bug 1547824 - Remove js::Value::payload union from 32-bit platforms. r=iain
Use well-defined conversions on the asBits_ instead. This removes union
arms entirely. They are slighly useful for debugging, but we don't have
that on our 64-bit platforms and the gdb helpers can already help us
out.

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

--HG--
extra : moz-landing-system : lando
2019-09-19 23:56:57 +00:00
Ted Campbell
0021ec7f24 Bug 1547824 - Remove js::Value::payload union from 64-bit platforms. r=iain
Use well-defined conversions on the asBits_ instead. The remaining union
arms were not even helpful for debuggers so we remove entirely.

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

--HG--
extra : moz-landing-system : lando
2019-09-19 23:56:59 +00:00
Tom Tung
be1286818d Bug 1562663 - P4a - Deny sharing memery by default for DataClonePolicy; r=nika,lth
Differential Revision: https://phabricator.services.mozilla.com/D45187

--HG--
extra : moz-landing-system : lando
2019-09-26 13:27:25 +00:00
Henri Sivonen
4cc848414e Bug 1578339 - Use SIMD accelerated encoding conversions in SpiderMonkey. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D44470

--HG--
extra : moz-landing-system : lando
2019-09-26 12:45:00 +00:00
Jeff Walden
ef9d1b4371 Bug 1582348 - Add the most skeleton WritableStream class imaginable. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D46397

--HG--
extra : moz-landing-system : lando
2019-09-23 23:57:58 +00:00
Jeff Walden
d05c6fe9fd Bug 1582348 - Add a realm creation option controlling whether WritableStream is enabled. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D46396

--HG--
extra : moz-landing-system : lando
2019-09-23 23:57:49 +00:00
Matthew Gaudet
eae20d8f2c Bug 1580378 - Support enabling parser deferred allocation mode on shell command line r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D45556

--HG--
extra : moz-landing-system : lando
2019-09-20 16:26:52 +00:00
Jon Coppeard
ad4df9ae33 Bug 1581574 - Remove Heap<T> write barrier and rely on existing read barrier to make incremental marking work r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D46133

--HG--
extra : moz-landing-system : lando
2019-09-20 10:09:19 +00:00
Jan de Mooij
7081cf6275 Bug 1577280 - Add a script filename validation callback. r=tcampbell
This is a process-wide callback that can be used by embedders to block parsing
or decoding of scripts that are considered unsafe.

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

--HG--
extra : moz-landing-system : lando
2019-09-20 07:41:30 +00:00
Gurzau Raul
6bd9ca2b13 Backed out 4 changesets (bug 1547824) for build bustage at vm/Interpreter.h on a CLOSED TREE.
Backed out changeset f87ca6d25d62 (bug 1547824)
Backed out changeset 261a25ae16e2 (bug 1547824)
Backed out changeset d2df23e104f1 (bug 1547824)
Backed out changeset 0188973c2b10 (bug 1547824)
2019-09-20 02:52:10 +03:00
Jeff Walden
8542e72e2a Bug 1582345 - Add a RealmCreationOption to control whether readable-stream support for BYOB readers is enabled. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D46395

--HG--
extra : moz-landing-system : lando
2019-09-19 21:12:56 +00:00
Jeff Walden
7583592954 Bug 1582345 - Add a RealmCreationOption controlling whether support for ReadableStreams of type "bytes" is enabled. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D46394

--HG--
extra : moz-landing-system : lando
2019-09-19 21:23:39 +00:00
Ted Campbell
d62aa85533 Bug 1547824 - Add Value::unboxGCPointer helper for JS::Value. r=iain
Abstracts the pointer unboxing pattern for both NUNBOX32 and PUNBOX64
formats. This also encapsulates some of the spectre mitigations.

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

--HG--
extra : moz-landing-system : lando
2019-09-19 21:12:06 +00:00
Ted Campbell
248faef2dc Bug 1547824 - Change JS::Value from union to class. r=jwalden
Now that all the bad type-punning is gone, JS::Value has a single
asBits_ field and we should use a class aggregate type instead.

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

--HG--
extra : moz-landing-system : lando
2019-09-19 21:12:05 +00:00
Ted Campbell
80b4dc297a Bug 1547824 - Remove js::Value::payload union from 32-bit platforms. r=iain
Use well-defined conversions on the asBits_ instead. This removes union
arms entirely. They are slighly useful for debugging, but we don't have
that on our 64-bit platforms and the gdb helpers can already help us
out.

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

--HG--
extra : moz-landing-system : lando
2019-09-19 21:12:05 +00:00
Ted Campbell
80c3890f81 Bug 1547824 - Remove js::Value::payload union from 64-bit platforms. r=iain
Use well-defined conversions on the asBits_ instead. The remaining union
arms were not even helpful for debuggers so we remove entirely.

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

--HG--
extra : moz-landing-system : lando
2019-09-19 21:12:05 +00:00
Ted Campbell
a7526cb49d Bug 1575055 - Avoid duplicating CompileOptions constructor code. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D42562

--HG--
extra : moz-landing-system : lando
2019-09-18 15:05:53 +00:00
Ted Campbell
b47af937d5 Bug 1575055 - Remove redundant overrides in ReadOnlyCompileOptions. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D42561

--HG--
extra : moz-landing-system : lando
2019-09-18 15:05:46 +00:00
Ted Campbell
559cc45195 Bug 1575055 - Unify JS::CompileOptions::canLazilyParse and forceFullParse_. r=jandem
If either the Realm or the request needs full-parsing, we disable lazy
parsing.

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

--HG--
extra : moz-landing-system : lando
2019-09-18 15:05:42 +00:00
Ted Campbell
5aa2fa2264 Bug 1575055 - Privatize js::CompileOptions::strictMode. r=jandem
We already have an accessor to make sure this is can only be set but not
cleared so hide the underlying storage.

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

--HG--
extra : moz-landing-system : lando
2019-09-18 15:05:35 +00:00
Ted Campbell
f6f8dc5112 Bug 1575055 - Remove unused CompileOptions::setIntroductionScript. r=jandem
We should always use setIntroductionInfo instead.

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

--HG--
extra : moz-landing-system : lando
2019-09-18 15:05:28 +00:00
Henri Sivonen
83795d9c41 Bug 1561567 - Introduce rope-walking conversion from JS strings to UTF-8 in a byte span. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D41941

--HG--
extra : moz-landing-system : lando
2019-09-18 08:28:24 +00:00
Jon Coppeard
185aa0ee73 Bug 1579202 - Type cell pointer store buffers to simplify implementation r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D44894

--HG--
extra : moz-landing-system : lando
2019-09-06 10:12:59 +00:00
Chris Fallin
52eacd2891 Bug 1575350: Move JSScript side-tables from Realm to Zone. r=tcampbell,jonco
Also closes bug 1576216: update ZoneStats and RealmStats memory
accounting for this change.

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

--HG--
extra : moz-landing-system : lando
2019-08-29 22:28:20 +00:00
Will Hawkins
9e72ec1f8d Bug 1551313: Insert profiler markers when preferences are accessed. r=squib,gregtatum
Reviewers: squib, mstange, gregtatum

Reviewed By: squib, gregtatum

Subscribers: julienw, Fallen, reviewbot, mixedpuppy, mstange

Bug #: 1551313

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

--HG--
extra : rebase_source : e7e0b41b2a4c6f7228f3d6c19ede1fe2e4e42343
extra : histedit_source : 55daf5b19e4f262f522339b5b00ee31130abbf1b
2019-08-23 13:12:51 +03:00
Brian Hackett
6f70f1e367 Bug 1572596 Part 1 - Add source URLs slot to global objects which is cleared on shrinking GC, r=jonco.
Differential Revision: https://phabricator.services.mozilla.com/D41682

--HG--
extra : moz-landing-system : lando
2019-08-22 00:07:41 +00:00
Jon Coppeard
266f4c6efb Bug 1575175 - Rename memory counter classes now they're used for both GC and malloc heaps r=sfink
This renames:
  HeapSize::gcBytes -> bytes (it's not just for GC heaps any more)
  ZoneThreshold -> HeapThreshold (to go with HeapSize)
  HeapThreshold::triggerBytes -> bytes (what else could it be?)

I renamed the ZoneAllocator members to make them more uniform/consitent so we now have gcHeapSize/gcHeapThreshold, mallocHeapSize/mallocHeapThreshold etc.

I also renamed the heap threshold classes.

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

--HG--
extra : moz-landing-system : lando
2019-08-21 15:14:31 +00:00
Jon Coppeard
057ec26442 Bug 1575251 - Remove some unnecessary uses of shadow::Zone r=allstarschh
Differential Revision: https://phabricator.services.mozilla.com/D42667

--HG--
extra : moz-landing-system : lando
2019-08-20 18:52:58 +00:00
Jon Coppeard
45a3b432c0 Bug 1574098 - Remove unused defines from Class.h r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D42086

--HG--
extra : moz-landing-system : lando
2019-08-15 13:04:43 +00:00
Jon Coppeard
d4f47d27ad Bug 1573844 - Remove references to js::Class and remove the alias r=tcampbell
The final huge patch. This is a search-and-replace removal of js::Class followed by clang-format and removal of the alias from TypeDecls.h.

Depends on D41986

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

--HG--
extra : moz-landing-system : lando
2019-08-14 19:13:12 +00:00
Jon Coppeard
41d076b49e Bug 1573844 - Remove js::Jsvalify and js::Valueify r=tcampbell
Depends on D41984

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

--HG--
extra : moz-landing-system : lando
2019-08-14 17:18:54 +00:00
Jon Coppeard
66fc30ba53 Bug 1573844 - Remove js::Class definition and alias JSClass to it r=tcampbell,mccr8
JSClass contained void* members corresponding to the internal pointer members of js::Class. This stores the internal members in JSClass and removes js::Class.

This leaves js::Class aliased to JSClass while we remove references to it. I also aliased Jsvalify and Valueify into global scope temporarily to make this compile. These get removed in the following patches.

I had to remove a few functions which now don't compile with js::Class being the same type as JSClass.

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

--HG--
extra : moz-landing-system : lando
2019-08-15 08:32:22 +00:00
Jon Coppeard
e22ceecec6 Bug 1573508 - Replace internal references to js::ClassOps with JSClassOps and remove the alias r=tcampbell
Another big patch. This a search-and-replace followed by mach clang-format, and removal of the js::ClassOps alias from Class.h.

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

--HG--
extra : moz-landing-system : lando
2019-08-14 10:00:05 +00:00
Jon Coppeard
74f39034b7 Bug 1573508 - Remove js::ClassOps in favour of JSClassOps now these are the same r=tcampbell
This removes the original js::ClassOps but leaves it aliased to JSClassOps so everything compiles for now.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 23:36:55 +00:00
Andrew McCreight
be5f1ce737 Bug 1559489, part 2 - Split out the back half of RemapWrapper into a new method. r=tcampbell
I need it for the final patch.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 19:09:46 +00:00
Jon Coppeard
992d6b6ce5 Bug 1570905 - Rework the GC triggers to make the incremental trigger the default and the non-incremental trigger some factor of this r=sfink?
Differential Revision: https://phabricator.services.mozilla.com/D41606

--HG--
extra : moz-landing-system : lando
2019-08-13 08:40:36 +00:00
Jon Coppeard
8b73371be0 Bug 1407593 - Report embedding leaks of JS GC things r=sfink,sfink?
Patch to report JS GC things that are live at shutdown as leaks by calling MOZ_LOG_CTOR for them. The JS engine now clears any remaining roots to prevent dangling pointers to freed memory after shutdown. I made XPCJSRuntime::Shutdown keep the weak pointer update callbacks as sometimes these tables have entries remaining at shutdown (if there are leaks) and we need the callbacks to update them.

This is looking more green on try now.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 08:31:49 +00:00
André Bargull
268981bb20 Bug 1539780: Remove "--with-intl-api=build" build config option. r=jwalden
There are about the same number of occurrences of "ENABLE_INTL_API" and "EXPOSE_INTL_API"
in the tree, so preferring one over the other doesn't lead to fewer changes. Therefore
I went with "ENABLE_INTL_API", because "ENABLE_" (resp. "MOZ_ENABLE") is already used as
the prefix for other preprocessor ifdef's.

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

--HG--
extra : moz-landing-system : lando
2019-08-09 19:43:19 +00:00
Jon Coppeard
d21beb7f9e Bug 1572782 - Remove unused js::FreeOp alias and remaining references r=tcampbell?
Differential Revision: https://phabricator.services.mozilla.com/D41413

--HG--
extra : moz-landing-system : lando
2019-08-12 12:35:11 +00:00
Jon Coppeard
6c416aec4d Bug 1572782 - Replace internal use of js::FreeOp with JSFreeOp r=tcampbell?
Sorry for the huge patch.  This is pretty much a search and replace of all uses of js::FreeOp.

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

--HG--
extra : moz-landing-system : lando
2019-08-12 10:43:51 +00:00
Jon Coppeard
a00726d223 Bug 1572782 - Remove js::FreeOp and make JSFreeOp opaque in public API r=tcampbell?
Merge js::FreeOp and JSFreeOp, but alias the former to the latter while we fix uses.

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

--HG--
extra : moz-landing-system : lando
2019-08-12 10:43:32 +00:00
Oana Pop Rus
44aafcc0d0 Backed out 4 changesets (bug 1572782) for build bustages at build/src/obj-firefox/dist/include/nsIXPCScriptable.h on a CLOSED TREE
Backed out changeset ec9d15c69bc8 (bug 1572782)
Backed out changeset 8239e4baa0f4 (bug 1572782)
Backed out changeset 9fd7bea2b512 (bug 1572782)
Backed out changeset 11d750555fe1 (bug 1572782)
2019-08-12 13:37:03 +03:00
Jon Coppeard
fa84e34044 Bug 1572782 - Remove unused js::FreeOp alias r=tcampbell?
Differential Revision: https://phabricator.services.mozilla.com/D41413

--HG--
extra : moz-landing-system : lando
2019-08-12 10:16:04 +00:00
Jon Coppeard
8186c345e2 Bug 1572782 - Replace internal use of js::FreeOp with JSFreeOp r=tcampbell?
Sorry for the huge patch.  This is pretty much a search and replace of all uses of js::FreeOp.

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

--HG--
extra : moz-landing-system : lando
2019-08-12 10:16:02 +00:00
Jon Coppeard
9d51a35e93 Bug 1572782 - Remove js::FreeOp and make JSFreeOp opaque in public API r=tcampbell?
Merge js::FreeOp and JSFreeOp, but alias the former to the latter while we fix uses.

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

--HG--
extra : moz-landing-system : lando
2019-08-12 10:15:57 +00:00
Steve Fink
e79384d24c Bug 1572207 - Update AutoStableStringChars comment, r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D41421

--HG--
extra : moz-landing-system : lando
2019-08-09 20:41:12 +00:00
Jon Coppeard
3fb04aa631 Bug 1571021 - Key wrapper maps by wrapped type directly and remove CrossCompartmentKey class r=jandem?
Differential Revision: https://phabricator.services.mozilla.com/D41184

--HG--
extra : moz-landing-system : lando
2019-08-09 10:05:45 +00:00
Yoshi Cheng-Hao Huang
a29edd5706 Bug 1570590 : trace weak references in tracing. r=jonco
Introduces SweepingTracer and TraceWeakEdge to trace weak references in
AtomsTable::sweep and AtomsTable::sweepIncrementally while sweeping.
Also rename those two functions to traceWeak and traceWeakIncrementally.

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

--HG--
extra : moz-landing-system : lando
2019-08-08 12:27:50 +00:00
Andy Wingo
673d9945f5 Bug 1570886 - Remove enableBigInt run-time flag r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D40389

--HG--
extra : moz-landing-system : lando
2019-08-07 14:41:36 +00:00
Razvan Maries
2d23034c48 Backed out changeset 145b187e750f (bug 1570886) for perma xpcshell fails on test_objectgrips-08.js. CLOSED TREE 2019-08-06 20:12:16 +03:00
Andy Wingo
0f20ca98c4 Bug 1570886 - Remove enableBigInt run-time flag r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D40389

--HG--
extra : moz-landing-system : lando
2019-08-06 10:36:09 +00:00
Coroiu Cristina
37c688712e Backed out changeset 596ae187c20b (bug 1570886) for xpcshell failures at devtools/server/tests/unit/test_objectgrips-08.js on a CLOSED TREE 2019-08-06 12:47:50 +03:00
Andy Wingo
3f1bd1cb5a Bug 1570886 - Remove enableBigInt run-time flag r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D40389

--HG--
extra : moz-landing-system : lando
2019-08-05 13:00:28 +00:00
Andrew McCreight
6633271226 Bug 1570484 - Nuke Xray waivers for remote outer window proxies. r=bzbarsky,tcampbell,jonco
Remote outer window proxies can't be the target of a CCW, because if
you attempt to wrap them we just create a new outer window proxy.
Therefore, they can't be the target of an Xray wrapper, so they can't
have Xray waivers that do anything useful. However, if we do a
navigation from a local iframe to a remote iframe, we'll transplant a
remote outer window proxy onto a local outer window proxy, which might
have an Xray. This can cause some issues, particularly if we later
navigate back to a different local window.

To work around this, this patch nukes Xray waivers on navigation to a
remote outer window proxy. This makes Xray waiver behavior
inconsistent with the non-Fission behavior, but it is safer to leave
the non-Fission behavior alone for now, for fear of breaking addons.

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

--HG--
extra : moz-landing-system : lando
2019-08-05 16:32:31 +00:00
Brindusan Cristian
2d3a2752f0 Backed out changeset 344a525cddbc (bug 1570484) for spidermonkey bustage at BaseProxyHandler.cpp:389:25. CLOSED TREE 2019-08-05 18:25:24 +03:00
Andrew McCreight
9dc3bbe1f0 Bug 1570484 - Nuke Xray waivers for remote outer window proxies. r=bzbarsky,tcampbell,jonco
Remote outer window proxies can't be the target of a CCW, because if
you attempt to wrap them we just create a new outer window proxy.
Therefore, they can't be the target of an Xray wrapper, so they can't
have Xray waivers that do anything useful. However, if we do a
navigation from a local iframe to a remote iframe, we'll transplant a
remote outer window proxy onto a local outer window proxy, which might
have an Xray. This can cause some issues, particularly if we later
navigate back to a different local window.

To work around this, this patch nukes Xray waivers on navigation to a
remote outer window proxy. This makes Xray waiver behavior
inconsistent with the non-Fission behavior, but it is safer to leave
the non-Fission behavior alone for now, for fear of breaking addons.

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

--HG--
extra : moz-landing-system : lando
2019-08-05 14:55:43 +00:00
Paul Bone
f04afcd7ec Bug 1388701 - Remove the special nursery size of 0 r=jonco
Rather than make re-enabling the nursery work correctly (because there's
various ways to disable it and we'd need to make sure we're enabling it for
the right reason).  It's simplier just to not disable it for a
gcMaxNurseryBytes of 0, and instead return an error.

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

--HG--
extra : moz-landing-system : lando
2019-08-05 06:37:55 +00:00
Tom Ritter
0b9efb84de Bug 1567623 - Add Event Telemetry for cases where eval is triggered as System Principal r=chutten,bzbarsky,tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D39559

--HG--
extra : moz-landing-system : lando
2019-08-01 20:45:31 +00:00
Jon Coppeard
2d89bbf3df Bug 1569564 - Remove the original malloc counter infrastructure r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D39735

--HG--
extra : moz-landing-system : lando
2019-07-31 09:13:36 +00:00
Jon Coppeard
9730094120 Bug 1569564 - Replace the JIT code counter using the new precise tracking infrastructure r=sfink
This replaces the original JIT code memory counter with one that tracks the allocated JIT code precisely.  This now uses a fixed threshold which was the original intention.

This also removes the INCREMENTAL_MALLOC_TRIGGER GC reason and all GCs triggered by malloc allocations use TOO_MUCH_MALLOC, so whether a GC is incremental is separated from the trigger reason.

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

--HG--
extra : moz-landing-system : lando
2019-07-31 09:13:19 +00:00
Jon Coppeard
7826afea3a Bug 1569560 - Add tuning parameters for new malloc counter r=sfink
This adds two new parameters.  The growth fator is set to 1.5 and the base to 42MB.  Trail and error showed that this latter value ended up triggering GCs roughtly in line with the old malloc counter.  These values make the initial malloc threshold ~64MB.

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

--HG--
extra : moz-landing-system : lando
2019-07-31 09:12:37 +00:00
Paul Bone
d1b58951a1 Bug 1569840 - Add a nurseryBytes runtime parameter r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D39836

--HG--
extra : moz-landing-system : lando
2019-07-31 00:34:15 +00:00