Backed out changeset ec75fa65fb37 (bug 1342863)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 23 Mar 2017 08:41:35 +0100
changeset 349013 8336e78ce5b43b1e70b690f6231b563c6aa8b050
parent 349012 4b3a8d72194cd3c5608860c92550880f525725e1
child 349014 f7b3ed3f4674d2b37fc143730c1a06049b7c9820
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 outec75fa65fb375bb28c50d17be3f6cfa3323ec0cc
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 ec75fa65fb37 (bug 1342863)
layout/base/ZoomConstraintsClient.cpp
--- a/layout/base/ZoomConstraintsClient.cpp
+++ b/layout/base/ZoomConstraintsClient.cpp
@@ -153,22 +153,18 @@ ZoomConstraintsClient::Observe(nsISuppor
   if (SameCOMIdentity(aSubject, mDocument) && BEFORE_FIRST_PAINT.EqualsASCII(aTopic)) {
     ZCC_LOG("Got a before-first-paint event in %p\n", this);
     RefreshZoomConstraints();
   } else if (NS_PREF_CHANGED.EqualsASCII(aTopic)) {
     ZCC_LOG("Got a pref-change event in %p\n", this);
     // We need to run this later because all the pref change listeners need
     // to execute before we can be guaranteed that gfxPrefs::ForceUserScalable()
     // returns the updated value.
-
-    RefPtr<nsRunnableMethod<ZoomConstraintsClient>> event =
-      NewRunnableMethod(this, &ZoomConstraintsClient::RefreshZoomConstraints);
-    mDocument->Dispatch("ZoomConstraintsClient::RefreshZoomConstraints",
-                        TaskCategory::Other,
-                        event.forget());
+    NS_DispatchToMainThread(NewRunnableMethod(
+      this, &ZoomConstraintsClient::RefreshZoomConstraints));
   }
   return NS_OK;
 }
 
 void
 ZoomConstraintsClient::ScreenSizeChanged()
 {
   ZCC_LOG("Got a screen-size change notification in %p\n", this);