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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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