From e29c74c67708e2aa8e2d8be79a7b7cfb376e8855 Mon Sep 17 00:00:00 2001 From: Ed Morley Date: Thu, 12 Sep 2013 09:29:14 +0100 Subject: [PATCH] Backed out changeset cc9df767c70b (bug 914521) for Android timeouts during crashtests --- docshell/base/crashtests/914521.html | 33 ------------------------ docshell/base/crashtests/crashtests.list | 1 - docshell/base/nsDocShell.cpp | 11 +++----- 3 files changed, 3 insertions(+), 42 deletions(-) delete mode 100644 docshell/base/crashtests/914521.html diff --git a/docshell/base/crashtests/914521.html b/docshell/base/crashtests/914521.html deleted file mode 100644 index 9ae18b86068..00000000000 --- a/docshell/base/crashtests/914521.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - diff --git a/docshell/base/crashtests/crashtests.list b/docshell/base/crashtests/crashtests.list index 464881f04a9..eddb1e67a83 100644 --- a/docshell/base/crashtests/crashtests.list +++ b/docshell/base/crashtests/crashtests.list @@ -11,4 +11,3 @@ load 500328-1.html load 514779-1.xhtml load 614499-1.html load 678872-1.html -pref(dom.disable_open_during_load,false) load 914521.html diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 794fa4b2749..79d088f7013 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -9214,23 +9214,18 @@ nsDocShell::InternalLoad(nsIURI * aURI, SetDocCurrentStateObj(mOSHE); // Dispatch the popstate and hashchange events, as appropriate. - // - // The event dispatch below can cause us to re-enter script and - // destroy the docshell, nulling out mScriptGlobal. Hold a stack - // reference to avoid null derefs. See bug 914521. - nsRefPtr win = mScriptGlobal; - if (win) { + if (mScriptGlobal) { // Fire a hashchange event URIs differ, and only in their hashes. bool doHashchange = sameExceptHashes && !curHash.Equals(newHash); if (historyNavBetweenSameDoc || doHashchange) { - win->DispatchSyncPopState(); + mScriptGlobal->DispatchSyncPopState(); } if (doHashchange) { // Make sure to use oldURI here, not mCurrentURI, because by // now, mCurrentURI has changed! - win->DispatchAsyncHashchange(oldURI, aURI); + mScriptGlobal->DispatchAsyncHashchange(oldURI, aURI); } }