diff --git a/dom/base/nsObjectLoadingContent.cpp b/dom/base/nsObjectLoadingContent.cpp index fa8eb49f65ab..ef8aad101a92 100644 --- a/dom/base/nsObjectLoadingContent.cpp +++ b/dom/base/nsObjectLoadingContent.cpp @@ -2719,8 +2719,8 @@ nsObjectLoadingContent::NotifyStateChanged(ObjectType aOldType, EventStates newState = ObjectState(); if (newState != aOldState) { + NS_ASSERTION(thisContent->IsInComposedDoc(), "Something is confused"); // This will trigger frame construction - NS_ASSERTION(InActiveDocument(thisContent), "Something is confused"); EventStates changedBits = aOldState ^ newState; { @@ -2728,6 +2728,7 @@ nsObjectLoadingContent::NotifyStateChanged(ObjectType aOldType, doc->ContentStateChanged(thisContent, changedBits); } if (aSync) { + NS_ASSERTION(InActiveDocument(thisContent), "Something is confused"); // Make sure that frames are actually constructed immediately. doc->FlushPendingNotifications(Flush_Frames); }