Bug 1398420 - Don't use SystemGroup for CookieServiceChild (r=jdm)
authorBill McCloskey <billm@mozilla.com>
Fri, 08 Sep 2017 21:10:22 -0700
changeset 429733 a4eac2ea9733b33d1ee69d09d910739d736d5bca
parent 429732 cf8105474157f0da838eba590812e923044f6a35
child 429734 9397d2b650e89cb4e906b7f1efba70e56c985cb0
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm
bugs1398420
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1398420 - Don't use SystemGroup for CookieServiceChild (r=jdm) I noticed a bug where the following can happen. The parent sends a TrackCookiesLoad message followed by an HTTP OnStartRequest message. When these messages are received in the child, the TrackCookiesLoad message goes in the SystemGroup event queue and the OnStartRequest message goes in the event queue for the relevant tab. Unfortunately, this means that the OnStartRequest message could run first since the queues have no guaranteed ordering. We really should be putting the TrackCookiesLoad message in the same queue that the OnStartRequest message goes in. I worked on that a little bit, but it's hard to get right. For now, I would like to leave the cookie message unlabeled. Any unlabeled message/event is totally ordered with respect to all other messages/events, so this fixes the bug. MozReview-Commit-ID: KiLDAhlrbB8
netwerk/cookie/CookieServiceChild.cpp
--- a/netwerk/cookie/CookieServiceChild.cpp
+++ b/netwerk/cookie/CookieServiceChild.cpp
@@ -70,20 +70,16 @@ CookieServiceChild::CookieServiceChild()
     return;
   }
 
   // This corresponds to Release() in DeallocPCookieService.
   NS_ADDREF_THIS();
 
   NeckoChild::InitNeckoChild();
 
-  gNeckoChild->SetEventTargetForActor(
-    this,
-    SystemGroup::EventTargetFor(TaskCategory::Other));
-
   // Create a child PCookieService actor.
   gNeckoChild->SendPCookieServiceConstructor(this);
 
   mIPCOpen = true;
 
   mTLDService = do_GetService(NS_EFFECTIVETLDSERVICE_CONTRACTID);
   NS_ASSERTION(mTLDService, "couldn't get TLDService");