Bug 1335778 - Make switchToFrame synchronous for in-process frames. r=ato

In the case of switching to an in-process frame, the checkLoad timer
is setup which waits for the frame's content to finish loading.

But the command doesn't actually wait for those events and calls
sendResponse() immediately. This causes a race condition for the
following commands.

MozReview-Commit-ID: 6vuQ7paQ55K

--HG--
extra : rebase_source : ceb590f435d84ead4eba2e718e1ebaa01900d33f
This commit is contained in:
Henrik Skupin 2017-04-25 11:29:02 +02:00
Родитель 778981d9cc
Коммит fd0dae0214
1 изменённых файлов: 1 добавлений и 0 удалений

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

@ -1606,6 +1606,7 @@ function switchToFrame(msg) {
curContainer.frame.focus();
}
checkTimer.initWithCallback(checkLoad, 100, Ci.nsITimer.TYPE_ONE_SHOT);
return;
}
sendResponse(rv, command_id);