Bug 1382079 - Backed out changeset 5fc778386eb1 (Bug 1379762 part 3). r=bz
authorEd Lee <edilee@mozilla.com>
Fri, 21 Jul 2017 13:54:17 -0700
changeset 419008 b19a95c5c5b758ac90d50be3bd137dd3b2c64d75
parent 419007 5a67359d51b46c42083f0188510d9ef608823947
child 419009 5e1c7ab7ec0768714acb3c3f79b9ced64e5b639c
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1382079, 1379762
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1382079 - Backed out changeset 5fc778386eb1 (Bug 1379762 part 3). r=bz Revert "Bug 1379762 part 3. Don't mess about with load blockers if our document is already in the COMPLETE readyState. r=smaug" This reverts commit 942614f701b47b4a650a0ec3d206d6c5921aba84.
dom/base/nsDocument.cpp
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -8805,21 +8805,18 @@ void
 nsDocument::BlockOnload()
 {
   if (mDisplayDocument) {
     mDisplayDocument->BlockOnload();
     return;
   }
 
   // If mScriptGlobalObject is null, we shouldn't be messing with the loadgroup
-  // -- it's not ours.  Also, if we're already in the COMPLETE state, that means
-  // we already had our load event, conceptually, so there's no more need to
-  // mess about with the load blocker.
-  if (mOnloadBlockCount == 0 && mScriptGlobalObject &&
-      GetReadyStateEnum() != READYSTATE_COMPLETE) {
+  // -- it's not ours.
+  if (mOnloadBlockCount == 0 && mScriptGlobalObject) {
     if (!nsContentUtils::IsSafeToRunScript()) {
       // Because AddRequest may lead to OnStateChange calls in chrome,
       // block onload only when there are no script blockers.
       ++mAsyncOnloadBlockCount;
       if (mAsyncOnloadBlockCount == 1) {
         nsContentUtils::AddScriptRunner(NewRunnableMethod(
           "nsDocument::AsyncBlockOnload", this, &nsDocument::AsyncBlockOnload));
       }