forked from mirrors/gecko-dev
Bug 1613147 - Console API on worker dispatches messages to the main-thread behind prefs, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D61578 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
3a88855e32
commit
79a7598f57
2 changed files with 12 additions and 3 deletions
|
|
@ -1573,9 +1573,11 @@ void Console::MethodInternal(JSContext* aCx, MethodName aMethodName,
|
|||
// We do this only in workers for now.
|
||||
NotifyHandler(aCx, aData, callData);
|
||||
|
||||
RefPtr<ConsoleCallDataWorkerRunnable> runnable =
|
||||
new ConsoleCallDataWorkerRunnable(this, callData);
|
||||
Unused << NS_WARN_IF(!runnable->Dispatch(aCx));
|
||||
if (StaticPrefs::dom_worker_console_dispatch_events_to_main_thread()) {
|
||||
RefPtr<ConsoleCallDataWorkerRunnable> runnable =
|
||||
new ConsoleCallDataWorkerRunnable(this, callData);
|
||||
Unused << NS_WARN_IF(!runnable->Dispatch(aCx));
|
||||
}
|
||||
}
|
||||
|
||||
// We store information to lazily compute the stack in the reserved slots of
|
||||
|
|
|
|||
|
|
@ -2910,6 +2910,13 @@
|
|||
value: true
|
||||
mirror: always
|
||||
|
||||
# Enables the dispatching of console log events from worker threads to the
|
||||
# main-thread.
|
||||
- name: dom.worker.console.dispatch_events_to_main_thread
|
||||
type: RelaxedAtomicBool
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
- name: dom.worklet.enabled
|
||||
type: bool
|
||||
value: false
|
||||
|
|
|
|||
Loading…
Reference in a new issue