Backed out changeset 17d753a5dd9a (bug 1342863) for bustage
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 23 Mar 2017 08:41:57 +0100
changeset 349015 9a6b874ce36df39ae189be8fa13878f4e6817671
parent 349014 f7b3ed3f4674d2b37fc143730c1a06049b7c9820
child 349016 00c615691a6b2d1cb9683a8017b656af41198796
push id39380
push usercbook@mozilla.com
push dateThu, 23 Mar 2017 07:42:12 +0000
treeherderautoland@9a6b874ce36d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1342863
milestone55.0a1
backs out17d753a5dd9a136cd91f1d762f2c78c561be3abb
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
Backed out changeset 17d753a5dd9a (bug 1342863) for bustage
layout/base/PresShell.cpp
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -2005,23 +2005,21 @@ PresShell::ResizeReflowIgnoreOverride(ns
       }
       if (mAsyncResizeEventTimer) {
         mAsyncResizeTimerIsActive = true;
         mAsyncResizeEventTimer->InitWithFuncCallback(AsyncResizeEventCallback,
                                                      this, 15,
                                                      nsITimer::TYPE_ONE_SHOT);
       }
     } else {
-      RefPtr<nsRunnableMethod<PresShell>> event =
-        NewRunnableMethod(this, &PresShell::FireResizeEvent);
-      nsresult rv = mDocument->Dispatch("PresShell::FireResizeEvent",
-                                        TaskCategory::Other,
-                                        do_AddRef(event));
-      if (NS_SUCCEEDED(rv)) {
-        mResizeEvent = event;
+      RefPtr<nsRunnableMethod<PresShell> > resizeEvent =
+        NewRunnableMethod("PresShell::FireResizeEvent",
+                          this, &PresShell::FireResizeEvent);
+      if (NS_SUCCEEDED(NS_DispatchToCurrentThread(resizeEvent))) {
+        mResizeEvent = resizeEvent;
         SetNeedStyleFlush();
       }
     }
   }
 
   return NS_OK; //XXX this needs to be real. MMP
 }
 
@@ -6253,25 +6251,21 @@ PresShell::ScheduleApproximateFrameVisib
   if (mHaveShutDown || mIsDestroying) {
     return;
   }
 
   if (mUpdateApproximateFrameVisibilityEvent.IsPending()) {
     return;
   }
 
-  RefPtr<nsRunnableMethod<PresShell>> event =
-    NewRunnableMethod(this, &PresShell::UpdateApproximateFrameVisibility);
-  nsresult rv =
-    mDocument->Dispatch("PresShell::UpdateApproximateFrameVisibility",
-                        TaskCategory::Other,
-                        do_AddRef(event));
-
-  if (NS_SUCCEEDED(rv)) {
-    mUpdateApproximateFrameVisibilityEvent = event;
+  RefPtr<nsRunnableMethod<PresShell> > ev =
+    NewRunnableMethod("PresShell::UpdateApproximateFrameVisibility",
+                      this, &PresShell::UpdateApproximateFrameVisibility);
+  if (NS_SUCCEEDED(NS_DispatchToCurrentThread(ev))) {
+    mUpdateApproximateFrameVisibilityEvent = ev;
   }
 }
 
 void
 PresShell::EnsureFrameInApproximatelyVisibleList(nsIFrame* aFrame)
 {
   if (!aFrame->TrackingVisibility()) {
     return;