Bug 1182247 - Only RegisterPluginForGeometryUpdates in nsPluginFrame::EndSwapDocShells if mInstanceOwner is non-null. r?tnikkel
Having a non-null mInstanceOwner corresponds to when registration
normally happens (from nsPluginInstanceOwner::SetFrame), and it's
disconnecting the instance owner that leads to unregistration.
MozReview-Commit-ID: 3X15t9zoXIj
--- a/layout/generic/nsPluginFrame.cpp
+++ b/layout/generic/nsPluginFrame.cpp
@@ -1860,17 +1860,19 @@ nsPluginFrame::EndSwapDocShells(nsISuppo
widget->SetParent(parent);
nsWeakFrame weakFrame(objectFrame);
objectFrame->CallSetWindow();
if (!weakFrame.IsAlive()) {
return;
}
}
- objectFrame->RegisterPluginForGeometryUpdates();
+ if (objectFrame->mInstanceOwner) {
+ objectFrame->RegisterPluginForGeometryUpdates();
+ }
}
nsIFrame*
NS_NewObjectFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsPluginFrame(aContext);
}