Bug 1343475 - Add labeling for InitWithCallback in nsNativeTheme::QueueAnimatedContentForRefresh(). r=smaug
authorvincentliu <vliu@mozilla.com>
Thu, 13 Apr 2017 13:46:47 +0800
changeset 352950 e67191681118287e1c9e758e6f8d9751c090d304
parent 352949 9bf82d52f4799d34f09516836678f077c6d116b8
child 352951 d71858e17d350c66350fcf97836243d91a33ed87
push id31653
push userkwierso@gmail.com
push dateFri, 14 Apr 2017 00:24:20 +0000
treeherdermozilla-central@198effec6e11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1343475
milestone55.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 1343475 - Add labeling for InitWithCallback in nsNativeTheme::QueueAnimatedContentForRefresh(). r=smaug
widget/nsNativeTheme.cpp
--- a/widget/nsNativeTheme.cpp
+++ b/widget/nsNativeTheme.cpp
@@ -642,16 +642,19 @@ nsNativeTheme::QueueAnimatedContentForRe
 
   if (mAnimatedContentList.IsEmpty() || timeout != mAnimatedContentTimeout) {
     nsresult rv;
     if (!mAnimatedContentList.IsEmpty()) {
       rv = mAnimatedContentTimer->Cancel();
       NS_ENSURE_SUCCESS(rv, false);
     }
 
+    if (XRE_IsContentProcess() && NS_IsMainThread()) {
+      mAnimatedContentTimer->SetTarget(aContent->OwnerDoc()->EventTargetFor(TaskCategory::Other));
+    }
     rv = mAnimatedContentTimer->InitWithCallback(this, timeout,
                                                  nsITimer::TYPE_ONE_SHOT);
     NS_ENSURE_SUCCESS(rv, false);
 
     mAnimatedContentTimeout = timeout;
   }
 
   if (!mAnimatedContentList.AppendElement(aContent)) {