bug 489988 - Java Applets reload when print is called, r+sr=roc
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Sat, 25 Apr 2009 02:46:16 +0300
changeset 27827 b90d16b200883b7af4f4abdb307556c2098cc91a
parent 27826 49f4101fb09b15849e3f46e87b5fb0312f036710
child 27828 531f60d6cf88c13da87d58fac60065763ce0058f
push id6731
push useropettay@mozilla.com
push dateFri, 24 Apr 2009 23:46:45 +0000
treeherderautoland@b90d16b20088 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs489988
milestone1.9.2a1pre
bug 489988 - Java Applets reload when print is called, r+sr=roc
content/base/src/nsObjectLoadingContent.cpp
--- a/content/base/src/nsObjectLoadingContent.cpp
+++ b/content/base/src/nsObjectLoadingContent.cpp
@@ -129,24 +129,24 @@ nsAsyncInstantiateEvent::Run()
   mContent->mPendingInstantiateEvent = nsnull;
 
   // Make sure that we still have the right frame (NOTE: we don't need to check
   // the type here - GetExistingFrame() only returns object frames, and that
   // means we're a plugin)
   // Also make sure that we still refer to the same data.
   nsIObjectFrame* frame = mContent->
     GetExistingFrame(nsObjectLoadingContent::eFlushContent);
-#ifdef DEBUG
-  if (frame && mFrame.IsAlive()) {
-    nsIFrame* objectFrame = do_QueryFrame(frame);
-    NS_ASSERTION(objectFrame == mFrame.GetFrame(), "Wrong frame!");
+
+  nsIFrame* objectFrame = nsnull;
+  if (frame) {
+    objectFrame = do_QueryFrame(frame);
   }
-#endif
-  if (frame &&
-      mFrame.IsAlive() &&
+
+  if (objectFrame &&
+      mFrame.GetFrame() == objectFrame &&
       mContent->mURI == mURI &&
       mContent->mContentType.Equals(mContentType)) {
     if (LOG_ENABLED()) {
       nsCAutoString spec;
       if (mURI) {
         mURI->GetSpec(spec);
       }
       LOG(("OBJLC [%p]: Handling Instantiate event: Type=<%s> URI=%p<%s>\n",