diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index 0949e8af9b2..47d9d948e8e 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -5760,7 +5760,9 @@ nsDocument::FlushPendingNotifications(mozFlushType aType) void nsDocument::AddReference(void *aKey, nsISupports *aReference) { - if (mScriptGlobalObject) { + PRBool dummy; + nsIScriptGlobalObject* scriptObject = GetScriptHandlingObject(dummy); + if (scriptObject) { if (!mContentWrapperHash) { mContentWrapperHash = new nsInterfaceHashtable; if (mContentWrapperHash) { diff --git a/content/base/test/Makefile.in b/content/base/test/Makefile.in index 614b9c9804b..767cb9460ee 100644 --- a/content/base/test/Makefile.in +++ b/content/base/test/Makefile.in @@ -212,6 +212,7 @@ _TEST_FILES = test_bug5141.html \ test_bug368972.html \ test_bug450160.html \ test_bug454326.html \ + test_bug455853.html \ $(NULL) libs:: $(_TEST_FILES) diff --git a/content/base/test/test_bug455853.html b/content/base/test/test_bug455853.html new file mode 100644 index 00000000000..78354911b6b --- /dev/null +++ b/content/base/test/test_bug455853.html @@ -0,0 +1,41 @@ + + + + + Test for Bug 455853 + + + + + +Mozilla Bug 455853 +

+ +
+
+
+ +