None draft
authorKris Maglione <maglione.k@gmail.com>
Mon, 25 Nov 2019 19:36:31 +0000
changeset 2496017 8e1a78600b41711af9af87944985fbab5848123b
parent 2496016 70f1902211995a9efc72ff36b5f9985014d52c95
child 2496018 0e015715b0abf9ab6f0e529012b27c57da69a86d
push id455265
push userreviewbot
push dateMon, 25 Nov 2019 19:36:52 +0000
treeherdertry@7df9e6addf62 [default view] [failures only]
milestone72.0a1
None Differential Diff: PHID-DIFF-wygd5thcb6hfqnvt5ny7
dom/ipc/JSWindowActor.cpp
--- a/dom/ipc/JSWindowActor.cpp
+++ b/dom/ipc/JSWindowActor.cpp
@@ -234,17 +234,23 @@ void JSWindowActor::ReceiveMessageOrQuer
   RefPtr<MessageListener> messageListener =
       new MessageListener(self, global, nullptr, nullptr);
   messageListener->ReceiveMessage(argument, &retval, aRv,
                                   "JSWindowActor receive message");
 
   // If we have a promise, resolve or reject it respectively.
   if (promise) {
     if (aRv.Failed()) {
-      promise->MaybeReject(aRv);
+      if (aRv.IsUncatchableException()) {
+        aRv.SuppressException();
+        promise->MaybeRejectWithDOMException(
+            NS_ERROR_FAILURE, "Message handler threw uncatchable exception");
+      } else {
+        promise->MaybeReject(aRv);
+      }
     } else {
       promise->MaybeResolve(retval);
     }
   }
 }
 
 void JSWindowActor::ReceiveQueryReply(JSContext* aCx,
                                       const JSWindowActorMessageMeta& aMetadata,