Bug 1068626 - Don't try to paint a popup widget if we're in e10s and the content process r=jimm
authorGeorge Wright <george@mozilla.com>
Thu, 20 Nov 2014 12:28:58 -0500
changeset 241867 8709542d7b66db7ae4c455eddde919ba2dbf869b
parent 241866 cc030bbee6de65dbf000238cade6b218c0b9e8d7
child 241868 8d4b73db9b1225368a799b47b53511e6fae07054
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1068626
milestone36.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 1068626 - Don't try to paint a popup widget if we're in e10s and the content process r=jimm
widget/PuppetWidget.cpp
--- a/widget/PuppetWidget.cpp
+++ b/widget/PuppetWidget.cpp
@@ -9,16 +9,17 @@
 
 #include "ClientLayerManager.h"
 #include "gfxPlatform.h"
 #include "mozilla/dom/TabChild.h"
 #include "mozilla/Hal.h"
 #include "mozilla/IMEStateManager.h"
 #include "mozilla/layers/CompositorChild.h"
 #include "mozilla/layers/PLayerTransactionChild.h"
+#include "mozilla/Preferences.h"
 #include "mozilla/TextComposition.h"
 #include "mozilla/TextEvents.h"
 #include "PuppetWidget.h"
 #include "nsIWidgetListener.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::hal;
@@ -757,16 +758,24 @@ PuppetWidget::PaintTask::Run()
     mWidget->Paint();
   }
   return NS_OK;
 }
 
 bool
 PuppetWidget::NeedsPaint()
 {
+  // e10s popups are handled by the parent process, so never should be painted here
+  if (XRE_GetProcessType() == GeckoProcessType_Content &&
+      Preferences::GetBool("browser.tabs.remote.desktopbehavior", false) &&
+      mWindowType == eWindowType_popup) {
+    NS_WARNING("Trying to paint an e10s popup in the child process!");
+    return false;
+  }
+
   return mVisible;
 }
 
 float
 PuppetWidget::GetDPI()
 {
   if (mDPI < 0) {
     if (mTabChild) {