From 2024eed798e79e0c91d26f3c31d3f1520fc37eb8 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 9ae18b86068a..000000000000 --- 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 464881f04a9a..eddb1e67a83e 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 794fa4b27490..79d088f70134 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); } }