Bug 562319 - Make NavigationUtils.js try harder when detecting if a frame is done loading. r=bzbarsky.

This commit is contained in:
Henri Sivonen 2010-04-29 14:22:27 +03:00
parent aef7cd21c0
commit a24406dc4e

View File

@ -208,7 +208,11 @@ function xpcWaitForFinishedFrames(callback, numFrames) {
}
function searchForFinishedFrames(win) {
if (escape(unescape(win.location)) == escape(target_url)) {
if (escape(unescape(win.location)) == escape(target_url) &&
win.document &&
win.document.body &&
win.document.body.textContent == body &&
win.document.readyState == "complete") {
if (!contains(win, finishedWindows)) {
finishedWindows.push(win);
frameFinished();