Bug 1182247 - Only RegisterPluginForGeometryUpdates in nsPluginFrame::EndSwapDocShells if mInstanceOwner is non-null. r=tnikkel, a=ritu
authorL. David Baron <dbaron@dbaron.org>
Thu, 17 Mar 2016 17:57:53 -0700
changeset 323801 d59fb580e62f9db8f2b3428e3748cb82c0e545a1
parent 323800 bdce1c532b56d098c956c6dcd9a8259407e12125
child 323802 59db0f178e71825daab8621d2cc2a036ac0eaa3b
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstnikkel, ritu
bugs1182247
milestone47.0a2
Bug 1182247 - Only RegisterPluginForGeometryUpdates in nsPluginFrame::EndSwapDocShells if mInstanceOwner is non-null. r=tnikkel, a=ritu 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
@@ -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);
 }