Bug 1068626 - Don't try to paint a popup widget if we're in e10s and the content process r=jimm

This commit is contained in:
George Wright 2014-11-20 12:28:58 -05:00
parent 529a6af9c3
commit 4dda2bc537

View File

@ -14,6 +14,7 @@
#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"
@ -762,6 +763,14 @@ PuppetWidget::PaintTask::Run()
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;
}