bug 489988 - Java Applets reload when print is called, r+sr=roc
--- 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",