bug 773165 - more robust removal of frameworker's iframe. r=gavin

This commit is contained in:
Mark Hammond 2012-07-12 18:04:52 +10:00
Родитель 17143b0022
Коммит 8a10e6848c
1 изменённых файлов: 1 добавлений и 4 удалений

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

@ -212,10 +212,7 @@ FrameWorker.prototype = {
// let pending events get delivered before actually removing the frame
Services.tm.mainThread.dispatch(function deleteWorkerFrame() {
// now nuke the iframe itself and forget everything about this worker.
let doc = Cc["@mozilla.org/appshell/appShellService;1"]
.getService(Ci.nsIAppShellService)
.hiddenDOMWindow.document;
doc.documentElement.removeChild(this.frame);
this.frame.parentNode.removeChild(this.frame)
delete workerCache[this.url];
}.bind(this), Ci.nsIThread.DISPATCH_NORMAL);
}