Bug 1182247 - Only RegisterPluginForGeometryUpdates in nsPluginFrame::EndSwapDocShells if mInstanceOwner is non-null. r=tnikkel
authorL. David Baron <dbaron@dbaron.org>
Thu, 17 Mar 2016 17:57:53 -0700
changeset 291289 329a66b8e67c1c9367fbd496752e0488723aa79b
parent 291288 5005b1604f269e2204260bdff4b26a92564e42f6
child 291290 d3ba5b5019c6cd9348787e42ad0596c4d535cd14
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstnikkel
bugs1182247
milestone48.0a1
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
layout/generic/nsPluginFrame.cpp
--- a/layout/generic/nsPluginFrame.cpp
+++ b/layout/generic/nsPluginFrame.cpp
@@ -1861,17 +1861,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);
 }