Bug 773165 - more robust removal of frameworker's iframe. r=dao

This commit is contained in:
Mark Hammond 2012-07-12 18:04:52 +10:00
parent b5f9edf004
commit ee0f1179fd

View File

@ -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);
}