Bug 1325915 - Part 2, update comment for reseting event target of event queue after the completion of ServiceWorker interception. r=mayhemer draft
authorShih-Chiang Chien <schien@mozilla.com>
Tue, 07 Feb 2017 16:56:06 +0800
changeset 479801 f1a882bac48f03b8fadda430f84027c4c3ace010
parent 479800 da54f269b4b186ad784b2351f39829922f08db89
child 544783 6ade1c4d7e8bc4be5a52d74865e69c873caf93a5
push id44361
push userschien@mozilla.com
push dateTue, 07 Feb 2017 08:57:19 +0000
reviewersmayhemer
bugs1325915
milestone54.0a1
Bug 1325915 - Part 2, update comment for reseting event target of event queue after the completion of ServiceWorker interception. r=mayhemer MozReview-Commit-ID: Dc2TbCwQfpO
netwerk/protocol/http/HttpChannelChild.cpp
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -1200,18 +1200,18 @@ HttpChannelChild::OverrideRunnable::Run(
 
 mozilla::ipc::IPCResult
 HttpChannelChild::RecvFinishInterceptedRedirect()
 {
   // Hold a ref to this to keep it from being deleted by Send__delete__()
   RefPtr<HttpChannelChild> self(this);
   Send__delete__(this);
 
-  // Reset the event target to which queued messages are delivered. Otherwise
-  // we'll get an assertion when we re-use the channel later on.
+  // Reset the event target since the IPC actor is about to be destroyed.
+  // Following channel event should be handled on main thread.
   mEventQ->ResetDeliveryTarget();
 
   // The IPDL connection was torn down by a interception logic in
   // CompleteRedirectSetup, and we need to call FinishInterceptedRedirect.
   NS_DispatchToMainThread(NewRunnableMethod(this, &HttpChannelChild::FinishInterceptedRedirect));
 
   return IPC_OK();
 }