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

8242 Коммитов

Автор SHA1 Сообщение Дата
Yury Delendik 564b18936f Bug 1487113 - Use alt-data to cache stream-compiled WebAssembly modules. r=necko-reviewers,valentin,dragana
Differential Revision: https://phabricator.services.mozilla.com/D26731
2021-09-14 20:12:51 +00:00
Sandor Molnar d57e75a979 Backed out 11 changesets (bug 1730426) for causing assertion failures in src/vm/JSContext.
Backed out changeset ef37ce0219ea (bug 1730426)
Backed out changeset f1c824d4d39c (bug 1730426)
Backed out changeset d2dadbfb2cca (bug 1730426)
Backed out changeset 76ff766c5cdf (bug 1730426)
Backed out changeset bf394cc4b7f3 (bug 1730426)
Backed out changeset 4d27b63a0250 (bug 1730426)
Backed out changeset b28009dee3ff (bug 1730426)
Backed out changeset a22343e12ce4 (bug 1730426)
Backed out changeset 8363cf2dbda3 (bug 1730426)
Backed out changeset d89e8415905e (bug 1730426)
Backed out changeset 9e42f1860492 (bug 1730426)
2021-09-13 23:42:28 +03:00
Ted Campbell 811579616a Bug 1730426 - Start explicitly throwing uncatchable exceptions. r=jandem
Add Interrupt status to JS::ExceptionStatus and set it when intentionally
throwing an uncatchable exception. This is only a guideline for now, so avoid
excessive asserts for now.

Differential Revision: https://phabricator.services.mozilla.com/D125363
2021-09-13 19:21:26 +00:00
Byron Campen b67cbe0b60 Bug 1702417: Test case for bug. r=freddyb,mixedpuppy,necko-reviewers
We add the new content policy here, but leave the behavior as TYPE_OTHER, so
we can verify that the new test fails before the fix is applied.

Differential Revision: https://phabricator.services.mozilla.com/D124965
2021-09-13 18:20:10 +00:00
Ryan Hunt c871f74315 Bug 1615988 - Fix memory reporting of wasm memory. r=sfink
This commit makes several tweaks to memory reporting for wasm memory.
  * Add a field for shared wasm memory and track it in SAB.
    - Before this commit, shared wasm memory wouldn't report its guard pages but should.
  * Track wasm guard pages in RuntimeSizes, not ClassInfo
    - We want wasm guard pages to show as a top-level memory report item, similar to vmem,
      and not under the owning array object. Displaying under the owning object bloats the
      tree of memory usage with large amounts of memory that's only reserved and not
      committed, which is confusing. Before this commit the class info reporter would
      try to make this happen, but this approach was broken and the simplest fix is to
      track this on RuntimeSizes and report the value from their.
  * Only add wasm memory if the buffer is attached. Detached buffers may still be live
    but no longer own the wasm heap and shouldn't report their old size.

Differential Revision: https://phabricator.services.mozilla.com/D124390
2021-09-07 21:03:48 +00:00
Florian Quèze 998adb18ea Bug 1728760 - require all nsITimerCallback native implementations to also implement nsINamed, r=smaug.
Differential Revision: https://phabricator.services.mozilla.com/D124349
2021-09-07 08:01:18 +00:00
Matthew Gaudet 1c22a97031 Bug 1728802 - Remove overly paranoid guarding of class static block preference to allow riding the trains r=arai
Differential Revision: https://phabricator.services.mozilla.com/D124465
2021-09-03 16:54:12 +00:00
Florian Quèze 6e961a488c Bug 1727517 - Require task controller tasks to have a name, r=bas.
Differential Revision: https://phabricator.services.mozilla.com/D123618
2021-08-31 13:41:45 +00:00
Sandor Molnar c235ffd64c Backed out 3 changesets (bug 1727137, bug 1727517, bug 1727756) for causing build bustages. CLOSED TREE
Backed out changeset 8796b374824b (bug 1727756)
Backed out changeset 49d136788ebd (bug 1727517)
Backed out changeset 092525a3d26a (bug 1727137)
2021-08-30 19:39:16 +03:00
Florian Quèze ae2121ec28 Bug 1727517 - Require task controller tasks to have a name, r=bas.
Differential Revision: https://phabricator.services.mozilla.com/D123618
2021-08-30 16:09:49 +00:00
Andi-Bogdan Postelnicu 2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
André Bargull d2bbf86876 Bug 1726123 - Part 5: Add missing "js/" includes outside of SM. r=arai
In preparation for the next part, add missing includes to "js/" public headers.

Differential Revision: https://phabricator.services.mozilla.com/D122843
2021-08-17 15:45:39 +00:00
Yulia Startsev 84e1ae58eb Bug 1725621 - Remove Top Level Await preference and associated code; r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D122586
2021-08-17 13:08:00 +00:00
Jan de Mooij 5f87f0f2e1 Bug 1724693 part 3 - Move VarNamesSet from Realm to GlobalObjectData. r=jonco
This lets us remove the weak tracing code.

Also fixes a memory reporting issue: the reporter we had for this set wasn't
hooked up in Gecko.

Differential Revision: https://phabricator.services.mozilla.com/D122108
2021-08-14 13:02:47 +00:00
sanketh 0689bd0869 Bug 531915 - part 6 - optionally use fdlibm's sin, cos, and tan in jsmath r=tjr,arai
Adds a new preference javascript.options.use_fdlibm_for_sin_cos_tan (default
false) and uses fdlibm for Math.sin, Math.cos, and Math.tan conditioned on it.

Differential Revision: https://phabricator.services.mozilla.com/D119426
2021-08-13 11:57:07 +00:00
Iulian Moraru 538f123b07 Backed out 6 changesets (bug 531915) for causing build bustages. CLOSED TREE
Backed out changeset 65cf5929d5f2 (bug 531915)
Backed out changeset c9d70e46dfca (bug 531915)
Backed out changeset a4824d5f29fd (bug 531915)
Backed out changeset 9ec88b43d7a1 (bug 531915)
Backed out changeset 5f15204ccca9 (bug 531915)
Backed out changeset 14c95ef3dc44 (bug 531915)
2021-08-12 13:33:31 +03:00
sanketh 21ef77522a Bug 531915 - part 6 - optionally use fdlibm's sin, cos, and tan in jsmath r=tjr,arai
Adds a new preference javascript.options.use_fdlibm_for_sin_cos_tan (default
false) and uses fdlibm for Math.sin, Math.cos, and Math.tan conditioned on it.

Differential Revision: https://phabricator.services.mozilla.com/D119426
2021-08-12 09:59:03 +00:00
Gabriele Svelto 559377e821 Bug 1723934 - Remove useless nsExceptionHandler.h inclusions and crash reporter service definitions r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D121708
2021-08-09 20:08:17 +00:00
Jan de Mooij 1c8f0d1a67 Bug 1723715 part 1 - Add GlobalObjectData and use it for emptyGlobalScope. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D121981
2021-08-09 15:25:04 +00:00
Geoff Brown 664426469c Bug 1724296 - Remove many skip-if(verify) test annotations (xpcshell); r=jmaher,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D121926
2021-08-06 13:25:50 +00:00
Gian-Carlo Pascutto 3dcadce0be Bug 1721326 - Allow dynamic PTHREAD_STACK_MIN. r=glandium
https://phabricator.services.mozilla.com/D120708

Differential Revision: https://phabricator.services.mozilla.com/D120972
2021-08-04 06:24:47 +00:00
Kris Maglione d11b68db25 Bug 1719319: Make consistency error non-fatal on relase. r=mccr8
I still haven't figured out why this is happening, so since we can make it
non-fatal on release builds, we should, given the crash volume.

I don't want to completely silence the issue in non-release builds, since
something is clearly still wrong.

Differential Revision: https://phabricator.services.mozilla.com/D121686
2021-08-04 00:04:28 +00:00
Henrik Skupin 0edcc72b48 Bug 1722718 - [xpconnect] Allow Javascript to print to stderr. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D121094
2021-07-29 07:17:07 +00:00
Jan de Mooij 076691c7bc Bug 1722453 part 4 - Use a reserved slot instead of private slot for XPCWrappedNativeTearOff. r=jonco,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D120939
2021-07-29 07:06:08 +00:00
Jan de Mooij 500c7df4ed Bug 1722453 part 3 - Use a reserved slot instead of private slot for XPCWrappedNativeProto. r=jonco,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D120938
2021-07-29 07:06:07 +00:00
Ted Campbell 857e0e56a8 Bug 1688794 - Keep self-hosting stencil alive for duration of runtime. r=nbp
In order to instantiate directly from the self-hosting stencil (instead of
cloning from the special zone), we need the stencil to be part of the JS
runtime. This adds 45kB per content process right now, but will allow us to
remove the self-hosting zone entirely which will more than make up for this.

Differential Revision: https://phabricator.services.mozilla.com/D120540
2021-07-29 01:53:33 +00:00
Cosmin Sabou 8dd2d16e8a Backed out 12 changesets (bug 1688794) for xpcshell failures on test_ext_background_service_worker.js. CLOSED TREE
Backed out changeset 121b0b4cf551 (bug 1688794)
Backed out changeset 4888b8daa6b9 (bug 1688794)
Backed out changeset 79d28566a20c (bug 1688794)
Backed out changeset 5f36aebf0f6e (bug 1688794)
Backed out changeset eacb72c5069a (bug 1688794)
Backed out changeset 073610dd3479 (bug 1688794)
Backed out changeset 4230722c8e8e (bug 1688794)
Backed out changeset 7c57cdfa5b32 (bug 1688794)
Backed out changeset f370efcfeb76 (bug 1688794)
Backed out changeset d1285544f83c (bug 1688794)
Backed out changeset 936e59acffdc (bug 1688794)
Backed out changeset 2cdb8f0337ee (bug 1688794)
2021-07-28 20:41:24 +03:00
Ted Campbell cafe2686fc Bug 1688794 - Keep self-hosting stencil alive for duration of runtime. r=nbp
In order to instantiate directly from the self-hosting stencil (instead of
cloning from the special zone), we need the stencil to be part of the JS
runtime. This adds 45kB per content process right now, but will allow us to
remove the self-hosting zone entirely which will more than make up for this.

Differential Revision: https://phabricator.services.mozilla.com/D120540
2021-07-28 14:09:58 +00:00
Kris Maglione a8fe3ccdbf Bug 1719319: Part 2 - Make sure URLPreloader startup is marked complete at the same time as ScriptPreloader. r=mccr8
We need to make sure we stop adding entries before we start the cache write
task (which is triggered by the ScriptPreloader's cache write task after
startup is marked complete) so that the hashtable we're writing can't be
modified while we're iterating it from that thread.

Differential Revision: https://phabricator.services.mozilla.com/D120531
2021-07-27 20:29:10 +00:00
Kris Maglione a4da20eee2 Bug 1719319: Don't try to use the URLPreloader cache before it's fully initialized. r=mccr8
Anything accessed before that time won't benefit from caching, and having
entries inserted into the hashtable before the cache file is read may lead to
undefined behavior.

This bug shouldn't be exploitable, since it only affects file reads that
happen long before any untrusted code has a chance to run.

Differential Revision: https://phabricator.services.mozilla.com/D120391
2021-07-27 20:29:09 +00:00
Ryan Hunt d105003d3b Bug 1721721 - wasm: Remove duplicate import telemetry. r=jseward
This telemetry is no longer needed due to the CG's resolution
on duplicate imports.

Differential Revision: https://phabricator.services.mozilla.com/D120534
2021-07-23 14:33:28 +00:00
Kris Maglione 3ee95f8b32 Bug 1716849: Add crash annotation for error when aborting for failed module import. r=mccr8
There are a number of modules that we import from C++ and can't continue
running without. We have a number of crashes for some of those failed loads. A
lot of them are from OOMs or corruption, but we're not sure about the rest.

This patch adds a crash annotation with the details of the error wherever we
abort for failing to load a module.

Differential Revision: https://phabricator.services.mozilla.com/D120290
2021-07-22 16:58:02 +00:00
Butkovits Atila f1369e39ea Backed out changeset ef812b3d914d (bug 1716849) for causing assertion failures at nsImportModule.cpp. CLOSED TREE 2021-07-22 06:49:23 +03:00
Kris Maglione f69238e72d Bug 1716849: Add crash annotation for error when aborting for failed module import. r=mccr8
There are a number of modules that we import from C++ and can't continue
running without. We have a number of crashes for some of those failed loads. A
lot of them are from OOMs or corruption, but we're not sure about the rest.

This patch adds a crash annotation with the details of the error wherever we
abort for failing to load a module.

Differential Revision: https://phabricator.services.mozilla.com/D120290
2021-07-22 01:28:22 +00:00
nchevobbe b5f1a3988d Bug 1721123 - Expose AbortController in Sandbox. r=smaug.
AbortController can be used to remove multiple event listeners
in a single call, and that's a pattern the DevTools team want to
start using.
As some of DevTools code run in a Sandbox, we couldn't instantiate
AbortController there so far.
This patch exposes the AbortController in the Sandbox so instances
can be created.

Differential Revision: https://phabricator.services.mozilla.com/D120193
2021-07-21 06:02:20 +00:00
Niklas Goegge 1d4bd5fe8e Bug 1676024: Websockets triggered by extensions should not be subject to a page's CSP. r=ckerschb,mixedpuppy
Needs ReviewPublic

Differential Revision: https://phabricator.services.mozilla.com/D104671
2021-07-20 14:11:13 +00:00
Emilio Cobos Álvarez de54c4e1fc Bug 1718755 - Fix the SpecialPowers pref code to deal with ui / font prefs correctly after the previous change. r=kmag
This allows us to remove the timeout (which was there for these prefs)
and makes the code a bit more explicit.

Unconditionally making all tests wait for rAF causes some timing changes
which cause some tests to time out / fail, see:

  https://treeherder.mozilla.org/jobs?repo=try&revision=3aef4c168c6ab7d762dd360f49d4f56dff686c03

So this only does it when changing the prefs that care about it. Fix
some tests that were relying on the timeout to get this green.

Differential Revision: https://phabricator.services.mozilla.com/D119040
2021-07-20 14:10:58 +00:00
Yulia Startsev 02510713b6 Bug 1721149 - Ship hasOwn; r=evilpie
Differential Revision: https://phabricator.services.mozilla.com/D120212
2021-07-20 09:36:53 +00:00
Bob Owen b2d767fbb9 Bug 1716024 p2: Flag all binaries apart from firefox, xpcshell and plugin-container as CET compatible. r=glandium
We will only run the processes in CET compatible modules only mode when not
using the JIT code. So marking xul.dll as compatible should be OK.

Differential Revision: https://phabricator.services.mozilla.com/D117551
2021-07-19 07:36:19 +00:00
Florian Quèze 292c1a1f60 Bug 1720368 - Remove MOZ_GECKO_PROFILER ifdefs around profiler_init and profiler_shutdown calls, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D119809
2021-07-15 22:04:23 +00:00
Butkovits Atila 433d514141 Backed out 4 changesets (bug 1718755) for causing Reftest failures. CLOSED TREE
Backed out changeset f2cc4fb3caa8 (bug 1718755)
Backed out changeset babc4fdcd08c (bug 1718755)
Backed out changeset 4566477a7075 (bug 1718755)
Backed out changeset 3cc5fcf9aeb6 (bug 1718755)
2021-07-14 18:36:32 +03:00
Emilio Cobos Álvarez 0d448eff03 Bug 1718755 - Fix the SpecialPowers pref code to deal with ui / font prefs correctly after the previous change. r=kmag
This allows us to remove the timeout (which was there for these prefs)
and makes the code a bit more explicit.

Unconditionally making all tests wait for rAF causes some timing changes
which cause some tests to time out / fail, see:

  https://treeherder.mozilla.org/jobs?repo=try&revision=3aef4c168c6ab7d762dd360f49d4f56dff686c03

So this only does it when changing the prefs that care about it. Fix
some tests that were relying on the timeout to get this green.

Differential Revision: https://phabricator.services.mozilla.com/D119040
2021-07-14 11:29:25 +00:00
Tooru Fujisawa 8f6310e25c Bug 1708450 - Move call and construct functions into js/public/CallAndConstruct.h. r=nbp
Depends on D119619

Differential Revision: https://phabricator.services.mozilla.com/D119620
2021-07-13 11:52:43 +00:00
Tooru Fujisawa cc92ef732d Bug 1708448 - Move property and element functions into js/public/PropertyAndElement.h. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D119619
2021-07-13 11:52:42 +00:00
Tooru Fujisawa bf37e9d86e Bug 1708432 - Move JS_Get*PropertyDescriptor* to js/public/PropertyDescriptor.h. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D119617
2021-07-13 11:52:41 +00:00
Jan de Mooij f0855a566f Bug 1719795 part 6 - Remove null check for JS::GetClass return value. r=mccr8
Every JSObject has a non-null JSClass and a lot of code depends on this.

Differential Revision: https://phabricator.services.mozilla.com/D119618
2021-07-13 09:31:34 +00:00
Jan de Mooij 59f8590115 Bug 1719795 part 5 - Change JSCLASS_PRIVATE_IS_NSISUPPORTS JSClasses to use a reserved slot instead. r=mccr8,jonco
This is a step towards removing object private slots.

Classes with JSCLASS_PRIVATE_IS_NSISUPPORTS now use JSCLASS_SLOT0_IS_NSISUPPORTS
instead. For most classes this means we need to add an extra reserved slot and remove
the private slot.

Global objects (SimpleGlobalObject and the XPConnect BackstagePass and Sandbox globals)
however can use the JSCLASS_GLOBAL_APPLICATION_SLOTS already there. These slots were
only used for WebIDL DOM globals until now.

Differential Revision: https://phabricator.services.mozilla.com/D119502
2021-07-13 09:31:34 +00:00
Jan de Mooij 5285ac89a9 Bug 1719795 part 4 - Remove unused AutoClonePrivateGuard. r=mccr8
Depends on D119500

Differential Revision: https://phabricator.services.mozilla.com/D119501
2021-07-13 09:31:34 +00:00
Jan de Mooij da70f70b5d Bug 1719795 part 3 - Inline XPC_WRAPPER_FLAGS. r=jonco,peterv
It's easier to reason about the JSClass flags without the extra level of indirection.

Depends on D119499

Differential Revision: https://phabricator.services.mozilla.com/D119500
2021-07-13 09:31:33 +00:00
Jan de Mooij ae80d7fdf0 Bug 1719795 part 2 - Use SandboxPrivate::GetPrivate more. r=mccr8
Depends on D119498

Differential Revision: https://phabricator.services.mozilla.com/D119499
2021-07-13 09:31:33 +00:00