Bug 1470306 - MessagePort unlinked should start the cleanup/close/shutdown procedure of the object, r=smaug a=ritu
authorAndrea Marchesini <amarchesini@mozilla.com>
Mon, 02 Jul 2018 12:02:39 +0200
changeset 480729 a07fb916fa61a068c5e8b22437ad5cbf9b6dbfad
parent 480728 0249442a741cb771fdd23cd5670d07ac63f920e2
child 480730 c1927c01d7ed7678e0115e6ff728ac26069a45ad
push id1757
push userffxbld-merge
push dateFri, 24 Aug 2018 17:02:43 +0000
treeherdermozilla-release@736023aebdb1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, ritu
bugs1470306
milestone62.0
Bug 1470306 - MessagePort unlinked should start the cleanup/close/shutdown procedure of the object, r=smaug a=ritu
dom/messagechannel/MessagePort.cpp
--- a/dom/messagechannel/MessagePort.cpp
+++ b/dom/messagechannel/MessagePort.cpp
@@ -172,19 +172,19 @@ private:
 NS_IMPL_CYCLE_COLLECTION_CLASS(MessagePort)
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(MessagePort,
                                                 DOMEventTargetHelper)
   if (tmp->mPostMessageRunnable) {
     NS_IMPL_CYCLE_COLLECTION_UNLINK(mPostMessageRunnable->mPort);
   }
 
-  NS_IMPL_CYCLE_COLLECTION_UNLINK(mMessages);
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mMessagesForTheOtherPort);
-  NS_IMPL_CYCLE_COLLECTION_UNLINK(mUnshippedEntangledPort);
+
+  tmp->CloseForced();
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(MessagePort,
                                                   DOMEventTargetHelper)
   if (tmp->mPostMessageRunnable) {
     NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPostMessageRunnable->mPort);
   }