8122 Commits

Author SHA1 Message Date
Narcis Beleuzu
33cc31099d Backed out 8 changesets (bug 1574475, bug 1699222) for build bustages on moz.build . CLOSED TREE
Backed out changeset 6c2c039872b3 (bug 1574475)
Backed out changeset 8a2a04743c5f (bug 1699222)
Backed out changeset 9437c60798d6 (bug 1574475)
Backed out changeset 7ef1884ac11b (bug 1574475)
Backed out changeset ec8c237d5298 (bug 1574475)
Backed out changeset 4a760b3f5d53 (bug 1574475)
Backed out changeset b229b0eea1e7 (bug 1574475)
Backed out changeset 03d34a2f10a6 (bug 1574475)
2021-04-22 18:10:59 +03:00
Valentin Gosu
db2d8bb0bc Bug 1574475 - Remove FTP error codes r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111249
2021-04-22 13:41:34 +00:00
Matthew Gaudet
183afd855e Bug 1648090 - Add context option for ergnomic brand checks r=arai
Differential Revision: https://phabricator.services.mozilla.com/D86571
2021-04-20 15:21:38 +00:00
Tom Schuster
b728526ade Bug 1704293 - Use Maybe<PropertyDescriptor> for BaseProxyHandler::getOwnPropertyDescriptor in DOM and XPConnect. r=jandem,smaug
Differential Revision: https://phabricator.services.mozilla.com/D112037
2021-04-19 19:51:59 +00:00
Lars T Hansen
e43b373f10 Bug 1705446 - Fix Firefox pref names in WasmFeatures. r=rhunt
The features rewrite got the names of the Firefox wasm prefs wrong, they
all have a wasm_ prefix that got chopped off.  This puts it back.

It sucks that we don't have meaningful test cases for this.  A manual
test case (see bug) is easy, but how to automate it?

Differential Revision: https://phabricator.services.mozilla.com/D112325
2021-04-16 14:20:49 +00:00
Yulia Startsev
eed5941314 Bug 1704561 - Ensure that Module return value is an object before binding it to evaluationPromise; r=evilpie
Differential Revision: https://phabricator.services.mozilla.com/D111849
2021-04-15 12:28:48 +00:00
Jan de Mooij
121252c62e Bug 1704851 part 1 - Change CheckRecursionLimit to AutoCheckRecursionLimit::check. r=tcampbell
The use of a C++ RAII class lets us simplify a few things and prepares for
the WASI changes in bug 1704771.

Differential Revision: https://phabricator.services.mozilla.com/D111868
2021-04-14 09:01:29 +00:00
Julian Seward
b84878b2a1 Bug 1686626 - Enable Ion by default for wasm on AArch64. r=lth.
This patch enables Ion by default as the optimising compiler for wasm on
AArch64, and disables Cranelift.  Cranelift is still available if the build is
configured with --enable-cranelift.  In that case, *only* Cranelift is
available.  There are no configuration flags to enable both Ion and Cranelift
simultaneously.

This mostly reverts the Phase 0 and Phase 1 patches that are bug 1678097
D102420 and D101867 respectively.

The command line option --wasm-force-ion has been removed.

With this patch in place, users of the shell should specify
`--wasm-compiler=optimizing` to get an optimising wasm compiler.  Which one is
provided depends on the configuration options as described above.
`--wasm-compiler=cranelift` and `--wasm-compiler=ion` are now only accepted
when the relevant compiler has been enabled, and so neither is a "safe" way to
request an optimising tier.

For that reason, test directories that previously requested
also-with-Ion-please by stating `test-also=--wasm-compiler=ion;` in their
`directives.txt` file, have been changed to use
`test-also=--wasm-compiler=optimizing;`.

In places where the JSContextOptions are set, the non-selected compiler (Ion
or CL) is explicitly set to `false` (eg, `.setWasmIon(false)`).  This may be
overly conservative, but seems wise given that it's not immediately obvious
what the previous value of that flag is, and given the recent difficulties
with incorrect option propagation/handling (eg, bug 1697560).

Differential Revision: https://phabricator.services.mozilla.com/D101695
2021-04-14 07:43:27 +00:00
Butkovits Atila
6e5df92d0f Backed out changeset 6d5699810780 (bug 1686626) for causing arm64 bustage on central. CLOSED TREE 2021-04-13 01:53:09 +03:00
Julian Seward
2288cd2d95 Bug 1686626 - Enable Ion by default for wasm on AArch64. r=lth.
This patch enables Ion by default as the optimising compiler for wasm on
AArch64, and disables Cranelift.  Cranelift is still available if the build is
configured with --enable-cranelift.  In that case, *only* Cranelift is
available.  There are no configuration flags to enable both Ion and Cranelift
simultaneously.

This mostly reverts the Phase 0 and Phase 1 patches that are bug 1678097
D102420 and D101867 respectively.

The command line option --wasm-force-ion has been removed.

With this patch in place, users of the shell should specify
`--wasm-compiler=optimizing` to get an optimising wasm compiler.  Which one is
provided depends on the configuration options as described above.
`--wasm-compiler=cranelift` and `--wasm-compiler=ion` are now only accepted
when the relevant compiler has been enabled, and so neither is a "safe" way to
request an optimising tier.

For that reason, test directories that previously requested
also-with-Ion-please by stating `test-also=--wasm-compiler=ion;` in their
`directives.txt` file, have been changed to use
`test-also=--wasm-compiler=optimizing;`.

In places where the JSContextOptions are set, the non-selected compiler (Ion
or CL) is explicitly set to `false` (eg, `.setWasmIon(false)`).  This may be
overly conservative, but seems wise given that it's not immediately obvious
what the previous value of that flag is, and given the recent difficulties
with incorrect option propagation/handling (eg, bug 1697560).

Differential Revision: https://phabricator.services.mozilla.com/D101695
2021-04-12 15:46:46 +00:00
Yoshi Cheng-Hao Huang
181f0dc91b Bug 1703181 - Part 2: Dispatch to TaskController. , r=KrisWright
We also call setHelperThreadTaskCallback earlier, now it's done in
XPCJSContext::Initialize. So GlobalHelperThreadState could know earlier
if we're dispatching to a external thread pool.

Differential Revision: https://phabricator.services.mozilla.com/D110924
2021-04-12 08:31:50 +00:00
Yoshi Cheng-Hao Huang
09d607f872 Bug 1703181 - Part 1: Remove HelperThreadPool. r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D110923
2021-04-12 08:31:50 +00:00
Ryan Hunt
f37dc5a46c Bug 1677204 - wasm: Factor out feature gating to declarative macro. r=lth
This commit adds a declarative `JS_FOR_WASM_FEATURES` macro which
expands for every WebAssembly proposal we are gating. Most feature
gating code is refactored to use this macro so that we have one place
we need to change to get the majority of this code working. The only
place that needs to be updated for new features is the browser pref
declaration code, as that cannot use this macro. This is documented
in the new WasmFeatures.h header.

The feature gating logic should work almost identically as before.
The changes are:
 * All browser prefs are moved to StaticPrefList.yaml
 * The code to enable a feature was conditionally compiled to not
   enable the feature at variously stages of the "flag-flow". Now
   the only place that is conditionally compiled to not work is
   in the WasmXFlag functions. This is to make the macro simpler
   and might be able to be reverted if need be.
 * The flag for gc is shortened from gcTypes to gc so that the
   existing usages of the wasmGcEnabled shell function don't have
   to change.

This commit also has the effect of giving function-references/gc/
exception-handling a proper browser pref for enabling the features.

Differential Revision: https://phabricator.services.mozilla.com/D110820
2021-04-09 20:03:51 +00:00
Ryan Hunt
90c8728cc9 Bug 1677204 - wasm: Remove multi-value flag. r=lth
Multi-value has shipped and can remove its feature flag.

Differential Revision: https://phabricator.services.mozilla.com/D110819
2021-04-09 20:03:51 +00:00
Tooru Fujisawa
55af083348 Bug 1702863 - Use a dedicate object for cross-realm weak map key. r=jandem,peterv
Differential Revision: https://phabricator.services.mozilla.com/D110954
2021-04-08 15:54:21 +00:00
Yulia Startsev
685df4d56e Bug 1681046 - Enable Top Level Await by default r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D110394
2021-04-08 08:21:56 +00:00
smolnar
8844e16700 Backed out 3 changesets (bug 1681046) for causing jsreftest failures in ScriptLoader. CLOSED TREE
Backed out changeset 6704600819ed (bug 1681046)
Backed out changeset 37f56518116b (bug 1681046)
Backed out changeset f61cb7496a35 (bug 1681046)
2021-04-07 12:50:28 +03:00
Yulia Startsev
2b2111b9b2 Bug 1681046 - Enable Top Level Await by default r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D110394
2021-04-07 08:45:37 +00:00
Brindusan Cristian
08e2af1cf7 Backed out 2 changesets (bug 1681046) for causing wpt failures in bare-specifiers.sub.html. CLOSED TREE
Backed out changeset a26ecd8063ea (bug 1681046)
Backed out changeset e161663a5a7c (bug 1681046)
2021-04-06 18:02:15 +03:00
Yulia Startsev
735bb5aa2a Bug 1681046 - Enable Top Level Await by default r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D110394
2021-04-06 12:10:12 +00:00
Jan de Mooij
9041351aa8 Bug 1700052 part 9 - Add js::GetterSetter GC thing. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D110256
2021-04-06 11:06:16 +00:00
Doug Thayer
f75d49d54f Bug 1702516 - Remove all terminateGlobal uses r=kmag
This never actually worked, because nothing ever listened to the notification
sent in XPCJSContext (kill-content-script-sandbox). We're also removing the
"Temporarily disable extension" button in the slow addon notification, which
was the primary caller of this - however, that's in a separate patch.

Differential Revision: https://phabricator.services.mozilla.com/D110583
2021-04-05 16:00:09 +00:00
Alexandru Michis
7ef047faaa Backed out changeset 0da564b9ec2e (bug 1681046) for causing dt failures in browser_webconsole_worklet_error.js
CLOSED TREE
2021-04-01 15:27:02 +03:00
Yulia Startsev
cfb0da74ab Bug 1681046 - Enable Top Level Await by default r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D110394
2021-04-01 11:08:44 +00:00
Florian Quèze
113408d081 Bug 1701524 - add more inner window ids in markers, r=canaltinova.
Differential Revision: https://phabricator.services.mozilla.com/D110046
2021-03-31 18:23:13 +00:00
Caroline Cullen
30b2db3912 Bug 1700771 - Create pref for inlining maximum function size. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D110350
2021-03-31 17:18:13 +00:00
Tom Schuster
cf21f18c06 Bug 1701904 - Add methods directly on PropertyDescriptor. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D110229
2021-03-30 18:48:49 +00:00
Yoshi Cheng-Hao Huang
deef568b93 Bug 1660006 - Part 2: Rename decommittedPages and update commit behavior. r=jonco
Change the unit of decommitted memory to pages.
And will commit first if there's no free committed arena.

Differential Revision: https://phabricator.services.mozilla.com/D109297
2021-03-27 09:02:54 +00:00
Jan de Mooij
2f81799232 Bug 1470081 part 2 - Remove JSGetterOp/JSSetterOp from PropertyDescriptor. r=evilpie,anba
GetterOp/SetterOp are now only used internally for array and arguments objects.
PropertyDescriptor no longer has to know about these properties.

Differential Revision: https://phabricator.services.mozilla.com/D109358
2021-03-26 08:51:25 +00:00
Jared Wein
8ea95d671b Bug 1670972 - Throw an exception if the default value provided to defineLazyPreferenceGetter doesn't match the prefType. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D93399
2021-03-25 20:15:38 +00:00
Agi Sferro
abb7600c37 Bug 1567341 - Remove unused serviceManager argument. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D106203
2021-03-24 21:49:34 +00:00
Agi Sferro
66b035f4a2 Bug 1567341 - Add outFile, errFile parameters to XREShellData. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D106201
2021-03-24 21:49:34 +00:00
Alexandru Michis
497409d76e Backed out 24 changesets (bug 1567341) for causing xpcshell failures in test_telemetry.js
CLOSED TREE

Backed out changeset deb795c7d0ed (bug 1567341)
Backed out changeset 62d24a3e5e33 (bug 1567341)
Backed out changeset 1185cabd94e0 (bug 1567341)
Backed out changeset 73a4ae419261 (bug 1567341)
Backed out changeset b6eb111329f3 (bug 1567341)
Backed out changeset 0dc0bfedc042 (bug 1567341)
Backed out changeset 9dca635e41d7 (bug 1567341)
Backed out changeset c34928580933 (bug 1567341)
Backed out changeset f9ba384bb407 (bug 1567341)
Backed out changeset ec25c2df380e (bug 1567341)
Backed out changeset 9e8ea542b51e (bug 1567341)
Backed out changeset 3dc62863a028 (bug 1567341)
Backed out changeset 6c104f865540 (bug 1567341)
Backed out changeset c422ca4207ea (bug 1567341)
Backed out changeset e3df748ed62f (bug 1567341)
Backed out changeset 9d1f27796a97 (bug 1567341)
Backed out changeset 1d93ba23f809 (bug 1567341)
Backed out changeset 55652f6af6ed (bug 1567341)
Backed out changeset 9fb892955a88 (bug 1567341)
Backed out changeset 1cdd95c43416 (bug 1567341)
Backed out changeset 5a839d5e3e33 (bug 1567341)
Backed out changeset ea84b5749a27 (bug 1567341)
Backed out changeset dcb1ae146475 (bug 1567341)
Backed out changeset d72accc274ac (bug 1567341)
2021-03-24 23:37:43 +02:00
Agi Sferro
7a469fd10f Bug 1567341 - Remove unused serviceManager argument. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D106203
2021-03-24 20:19:57 +00:00
Agi Sferro
67dbfc480e Bug 1567341 - Add outFile, errFile parameters to XREShellData. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D106201
2021-03-24 20:19:56 +00:00
Simon Giesecke
cc730d05dd Bug 1184468 - Use nsTHashtable::Keys where possible. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108588
2021-03-24 17:56:50 +00:00
Simon Giesecke
613e20d136 Bug 1184468 - Use nsBaseHashtable::Values. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108587
2021-03-24 17:56:49 +00:00
Tom Schuster
01d4cafbb1 Bug 1536094 - Support dynamic import from content scripts (sandboxed code) r=smaug,jonco
Firstly we need to find a usable ScriptLoader for code in the content script sandbox,
for that we use the normal ScriptLoader associated with DOMWindow wrapped by the sandbox.

Secondly we need to execute the module in the global of the sandbox instead of the
"ScriptGlobal" the ScriptLoader is actually associated with. The main
behavior change here comes from using xpc::NativeGlobal in HostImportModuleDynamically
and passing that global around inside ScriptFetchOptions.

To ensure that content-scripts and the webpage don't share imported modules,
the module map (mFetchingModules and mFetchedModules) now uses a complex key
of <URI, Global>. The Global is a nullptr for normal imports from a webpage.

Differential Revision: https://phabricator.services.mozilla.com/D107076
2021-03-23 11:15:11 +00:00
Bogdan Tara
a3fae8602d Backed out 3 changesets (bug 1536094) for causing bug 1700228 CLOSED TREE
Backed out changeset 464143c2b6ac (bug 1536094)
Backed out changeset 3462cb6573b1 (bug 1536094)
Backed out changeset d566c1c9e82f (bug 1536094)
2021-03-23 00:46:34 +02:00
Tom Schuster
bcb6e45e17 Bug 1536094 - Support dynamic import from content scripts (sandboxed code) r=smaug,jonco
Firstly we need to find a usable ScriptLoader for code in the content script sandbox,
for that we use the normal ScriptLoader associated with DOMWindow wrapped by the sandbox.

Secondly we need to execute the module in the global of the sandbox instead of the
"ScriptGlobal" the ScriptLoader is actually associated with. The main
behavior change here comes from using xpc::NativeGlobal in HostImportModuleDynamically
and passing that global around inside ScriptFetchOptions.

To ensure that content-scripts and the webpage don't share imported modules,
the module map (mFetchingModules and mFetchedModules) now uses a complex key
of <URI, Global>. The Global is a nullptr for normal imports from a webpage.

Differential Revision: https://phabricator.services.mozilla.com/D107076
2021-03-22 16:22:27 +00:00
Cosmin Sabou
cac540c776 Backed out 3 changesets (bug 1536094) for causing valgrind failures.
Backed out changeset dfe051a9c91a (bug 1536094)
Backed out changeset c73979442002 (bug 1536094)
Backed out changeset 863933e887e8 (bug 1536094)
2021-03-22 20:34:36 +02:00
Florian Quèze
8ad1e5d0aa Bug 1699742 - Remove MOZ_GECKO_PROFILER ifdefs that are no longer needed, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D109078
2021-03-22 16:29:52 +00:00
Tom Schuster
aa320997de Bug 1536094 - Support dynamic import from content scripts (sandboxed code) r=smaug,jonco
Firstly we need to find a usable ScriptLoader for code in the content script sandbox,
for that we use the normal ScriptLoader associated with DOMWindow wrapped by the sandbox.

Secondly we need to execute the module in the global of the sandbox instead of the
"ScriptGlobal" the ScriptLoader is actually associated with. The main
behavior change here comes from using xpc::NativeGlobal in HostImportModuleDynamically
and passing that global around inside ScriptFetchOptions.

To ensure that content-scripts and the webpage don't share imported modules,
the module map (mFetchingModules and mFetchedModules) now uses a complex key
of <URI, Global>. The Global is a nullptr for normal imports from a webpage.

Differential Revision: https://phabricator.services.mozilla.com/D107076
2021-03-22 16:22:27 +00:00
Andrew McCreight
77cb6426d5 Bug 1699784 - Fix two 'outselves' typos. r=smaug DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D109106
2021-03-19 18:32:09 +00:00
Simon Giesecke
b9621d6376 Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D108585
2021-03-17 15:49:46 +00:00
Lars T Hansen
f3ed586788 Bug 1678097 - Enable Ion for wasm on ARM64 (phase 1). r=lth.
In Phase 1, both Ion and Cranelift are available, and the default is switched
to Cranelift.  Use --wasm-force-ion or --wasm-compiler=ion at the shell to
select Ion, or make sure javascript.options.wasm_force_ion is true in
about:config.  Phase 1 is appropriate for fuzzing, after the patch set lands
in mozilla-central but before Ion is enabled by default.  The patch for Phase
1 will appear on bug 1678097 and will be very small, and MUST land with the
patch for Phase 0.

Differential Revision: https://phabricator.services.mozilla.com/D101867
2021-03-16 10:58:42 +00:00
Lars T Hansen
67d5845467 Bug 1678097 - Enable Ion for wasm on arm64 without SIMD (phase 0). r=lth.
In Phase 0, both Cranelift and Ion are available on arm64, and Ion is the
default.  Use --wasm-force-cranelift or --wasm-compiler=cranelift at the shell
to select Cranelift, or set javascript.options.wasm_force_ion to false in
about:config.  Phase 0 is appropriate for developers, before the patch set
lands in mozilla-central and before SIMD is present.

In Phase 1, both compilers are still available, but the default is switched to
Cranelift.  Use --wasm-force-ion or --wasm-compiler=ion at the shell to select
Ion, or make sure javascript.options.wasm_force_ion is true in about:config.
Phase 1 is appropriate for fuzzing, after the patch set lands in
mozilla-central but before Ion is enabled by default.  The patch for Phase 1
will appear on bug 1678097 and will be very small, and MUST land with the
patch for Phase 0.

In Phase 0 and Phase 1, --wasm-compiler=cranelift and --wasm-compiler=ion are
both accepted, and do the expected thing.

In Phase 2, Cranelift becomes disabled in moz.configure and all the changes in
the present patch are removed again.  The patch for Phase 2 will appear on bug
1686626 and will revert Phase 0 and Phase 1, and additionally update
moz.configure.

Differential Revision: https://phabricator.services.mozilla.com/D102420
2021-03-16 10:58:41 +00:00
Ted Campbell
31cb93d51e Bug 1697904 - Migrate the JIT spectre mitigation prefs to StaticPrefs. r=jandem
To simplify this code, turns these prefs into unlisted prefs on MIPS
platforms since the JIT support is missing there. The JitOptions will
continue to default them to false on MIPS.

Differential Revision: https://phabricator.services.mozilla.com/D108107
2021-03-15 22:20:44 +00:00
Ted Campbell
002f610266 Bug 1697904 - Migrate more JIT prefs to StaticPrefs. r=jandem
Also relax the type on large_arraybuffers to plain bool since it is only read
once on startup.

Differential Revision: https://phabricator.services.mozilla.com/D108106
2021-03-15 22:20:43 +00:00
Ted Campbell
3c1cf4006c Bug 1697904 - Migrate JIT threshold prefs to StaticPrefs. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D108105
2021-03-15 22:20:43 +00:00