RecvPCamerasConstructor() is used because IPC messages cannot be sent from
AllocPCamerasParent() because SetManagerAndRegister() has not been called to
change mLinkStatus to Connected.
Differential Revision: https://phabricator.services.mozilla.com/D140022
This test runs a lot of JS and triggers a lot of unrelated assertions,
some of which are fatal. The test added in bug 1755790 is much simpler
and a better fit for providing test coverage for the patches in bug
1749190.
Differential Revision: https://phabricator.services.mozilla.com/D141177
sThreadMonitor is held by the main thread while it sets sVideoCaptureThread
until after StartWithOptions() returns, at which point IsRunning() will
already return true and tasks can be queued for sVideoCaptureThread.
The queuing thread does not call PostTask() until it holds sThreadMonitor and
sVideoCaptureThread is set.
sVideoCaptureThread is cleared with sThreadMonitor held, so only one
CamerasParent will delete the thread.
StartWithOptions() is always called if sVideoCaptureThread is set and failure
is handled with a MOZ_CRASH(), so the thread always needs to be Stop()ed.
Depends on D140019
Differential Revision: https://phabricator.services.mozilla.com/D140020
DONTBUILD because just editing an in-tree doc.
This patch fixes a typo by adding a word that was previously missed ("in").
Differential Revision: https://phabricator.services.mozilla.com/D141164
This test assert that the debugger doesn't get unexpected request while debugging a page.
But for that, we should open the page while the debugger is opened.
Otherwise the page resources might be GC-ed, forcing the debugger to fetch some content again.
Differential Revision: https://phabricator.services.mozilla.com/D141078
PathUtils.filename throws if the path is not an absolute path, which was likely
not the case with the OS.Path.basename call used previously.
This internal change of behavior shouldn't be triggering any issue on Windows,
where the hostInfo.manifest.path seems to be always normalized into an absolute
path (by computing it as relative to the hostInfo.manifest if it wasn't already
an absolute path), but it makes browser.pkcs11.isModuleInstalled to regress
on Linux (and maybe also on MacOS if the pkcs11 manifest files include only
the library name and not its full path, as it seems to be the case for
the Belgium eID pkcs11 manifest packaged for Linux).
The result of PathUtils.filename is expected to only include the basename of
the file (without the full dir path and the file extension) and so to fix
the regression being triggered on non-windows platform we could use a fake
absolute url to get the expected result using PathUtils.filename as is.
Differential Revision: https://phabricator.services.mozilla.com/D141097
Pointer to AudioSession object is made std::atomic to resolve crashes (bug 1755700) by atomically modifying/reading the pointer as an effort to make sure any update to the pointer is seen across other threads immediately while not using locks to maintain such concurrency and avoiding dataraces.
This patch is built upon the work done in D136377.
Differential Revision: https://phabricator.services.mozilla.com/D140741
AsmJS compilation may be off the main thread, so we cannot report warnings
to JSContext. wasm::Log may do this if the right pref is on. CompileArgs::
build() uses wasm::Log. AsmJS uses CompileArgs::build(). This commit adds
a separate version of CompileArgs::build() which will not log or report
errors. AsmJS then asserts that only an OOM may be possible here, as we
should ensure a wasm compiler is available before compiling.
Differential Revision: https://phabricator.services.mozilla.com/D141007
Rebasing left an unused setPendingException method that
somehow didn't cause an error, until it causes compile
errors without exception handling.
There's also offsetof methods that need conditional
compilation.
Differential Revision: https://phabricator.services.mozilla.com/D140992
After enabling bytecode cache for module script, we need to handle
the SRI mismatch on bytecode cache, that requires reloading the script source
again.
Differential Revision: https://phabricator.services.mozilla.com/D140551
The module scripts are scanned immediately before executing, and if the
module script is not yet executed, and it matches the requirement for encoding
(size, fetch count, etc), it's marked as encode,
and they're scanned again immediately after executing, and marked scripts are
queued for bytecode encoding.
This patch doesn't actually enable the encoding, given ShouldCacheBytecode
returns false because the caching is not enabled for the channel and
GetCacheTokenFetchCount fails.
Differential Revision: https://phabricator.services.mozilla.com/D140296
As a preparation to use the bytecode encoding in the module evaluation code,
ScriptLoader::MaybePrepareForBytecodeEncoding is split into 2 parts:
* one for performing preparation before executing script
* one for queuing the request for bytecode encoding after executing script
In module's case, the bytecode encoding handling must be done on the entire
import tree, and also the module object's ScriptSlot is cleared on execution.
So, the script reference must be copied to the corresponding script load request
field before execution, and the script source must be queued for bytecode
encoding after executing the top-level script, so that incremental encoding
reflects functions called there.
Differential Revision: https://phabricator.services.mozilla.com/D140295
Module's ScriptSlot is cleared after evaluating the top-level script.
In order to skip modules imported multiple times when encoding, added
JS::IsModuleEvaluated.
Differential Revision: https://phabricator.services.mozilla.com/D140294