Bug 1229299: Use tail dispatch to notify the mirror of new value. r=bholley
authorJean-Yves Avenard <jyavenard@mozilla.com>
Tue, 01 Dec 2015 19:52:43 +1100
changeset 274999 f6e234ee862b570b9817fffe77d40cb03784166e
parent 274998 f0979ce60a871f6e892acaf29c473108cc215a7d
child 275000 668028d6bbbaf62239364e3ace7d710c755b303b
push id68751
push userjyavenard@mozilla.com
push dateTue, 01 Dec 2015 23:41:41 +0000
treeherdermozilla-inbound@f6e234ee862b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs1229299
milestone45.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 1229299: Use tail dispatch to notify the mirror of new value. r=bholley This ensures that tasks are run in the proper order.
xpcom/threads/StateMirroring.h
--- a/xpcom/threads/StateMirroring.h
+++ b/xpcom/threads/StateMirroring.h
@@ -132,17 +132,17 @@ private:
     }
 
     void AddMirror(AbstractMirror<T>* aMirror) override
     {
       MIRROR_LOG("%s [%p] adding mirror %p", mName, this, aMirror);
       MOZ_ASSERT(OwnerThread()->IsCurrentThreadIn());
       MOZ_ASSERT(!mMirrors.Contains(aMirror));
       mMirrors.AppendElement(aMirror);
-      aMirror->OwnerThread()->Dispatch(MakeNotifier(aMirror), AbstractThread::DontAssertDispatchSuccess);
+      aMirror->OwnerThread()->DispatchStateChange(MakeNotifier(aMirror));
     }
 
     void RemoveMirror(AbstractMirror<T>* aMirror) override
     {
       MIRROR_LOG("%s [%p] removing mirror %p", mName, this, aMirror);
       MOZ_ASSERT(OwnerThread()->IsCurrentThreadIn());
       MOZ_ASSERT(mMirrors.Contains(aMirror));
       mMirrors.RemoveElement(aMirror);