зеркало из https://github.com/mozilla/gecko-dev.git
Bug 932898 - Fix leaks in DOM tests; r=smaug CLOSED TREE
This commit is contained in:
Родитель
d0fd168866
Коммит
68c065a82f
|
@ -12,6 +12,10 @@ function onLoad() {
|
|||
|
||||
function onUnload() {
|
||||
if (!gIterations) {
|
||||
gBugWindow = null;
|
||||
Services.obs.removeObserver(onLoad, "bug839193-loaded");
|
||||
Services.obs.removeObserver(onUnload, "bug839193-unloaded");
|
||||
|
||||
window.focus();
|
||||
finish();
|
||||
} else {
|
||||
|
@ -25,12 +29,8 @@ function onUnload() {
|
|||
// will be apparent by the checks the harness performs.
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
Components.classes["@mozilla.org/observer-service;1"]
|
||||
.getService(Components.interfaces.nsIObserverService)
|
||||
.addObserver(onLoad, "bug839193-loaded", false);
|
||||
Components.classes["@mozilla.org/observer-service;1"]
|
||||
.getService(Components.interfaces.nsIObserverService)
|
||||
.addObserver(onUnload, "bug839193-unloaded", false);
|
||||
Services.obs.addObserver(onLoad, "bug839193-loaded", false);
|
||||
Services.obs.addObserver(onUnload, "bug839193-unloaded", false);
|
||||
|
||||
gBugWindow = window.openDialog(gTestRoot + "bug839193.xul");
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ function test() {
|
|||
let workerWindow = frame.contentWindow;
|
||||
workerWindow.addEventListener("message", function(evt) {
|
||||
is(evt.data.result, "ok", "check the sandbox code was happy");
|
||||
frame.remove();
|
||||
finish();
|
||||
}, true);
|
||||
let sandbox = new Cu.Sandbox(workerWindow);
|
||||
|
|
Загрузка…
Ссылка в новой задаче