diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-12-06 17:03:06 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-12-06 17:03:06 +0100 |
commit | c0ab25726daf60ded65903d54b8cccaf0cb46661 (patch) | |
tree | f59cfdacdbf13c5d13a401b7ae279b4530539baf | |
parent | d927df43e6af72869900b65e826f985b345bb509 (diff) | |
download | UXP-c0ab25726daf60ded65903d54b8cccaf0cb46661.tar UXP-c0ab25726daf60ded65903d54b8cccaf0cb46661.tar.gz UXP-c0ab25726daf60ded65903d54b8cccaf0cb46661.tar.lz UXP-c0ab25726daf60ded65903d54b8cccaf0cb46661.tar.xz UXP-c0ab25726daf60ded65903d54b8cccaf0cb46661.zip |
Add missing call to WaitForIsDebuggerRegistered
-rw-r--r-- | dom/workers/WorkerPrivate.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index 27eb570e9..c6ef21f2c 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -2543,6 +2543,12 @@ WorkerPrivateParent<Derived>::DisableDebugger() WorkerPrivate* self = ParentAsWorkerPrivate(); + // RegisterDebugger might have been dispatched but not completed. + // Wait for its execution to complete before unregistering. + if (!NS_IsMainThread()) { + self->WaitForIsDebuggerRegistered(true); + } + if (NS_FAILED(UnregisterWorkerDebugger(self))) { NS_WARNING("Failed to unregister worker debugger!"); } |