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.

--HG--
extra : rebase_source : 64b3ac9c9d23f176b3c04dd218fac5c6c5733237
This commit is contained in:
Ed Lee 2017-07-21 13:54:17 -07:00
Родитель 0fff6a4e53
Коммит d102dd0ba9
1 изменённых файлов: 2 добавлений и 5 удалений

Просмотреть файл

@ -8810,11 +8810,8 @@ nsDocument::BlockOnload()
}
// 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.