Bug 1285638 - Network monitor leaks window when a parent-side tab is closed. r=ochameau

This commit is contained in:
Jarda Snajdr 2016-07-10 10:37:00 +02:00
Родитель 39fafd8999
Коммит 3a9649172e
3 изменённых файлов: 23 добавлений и 0 удалений

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

@ -97,6 +97,7 @@ skip-if = (os == 'linux' && e10s && debug) # Bug 1242204
[browser_net_json_text_mime.js]
[browser_net_jsonp.js]
[browser_net_large-response.js]
[browser_net_leak_on_tab_close.js]
[browser_net_open_request_in_tab.js]
[browser_net_page-nav.js]
[browser_net_pane-collapse.js]

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

@ -0,0 +1,18 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
/**
* Tests that netmonitor doesn't leak windows on parent-side pages (bug 1285638)
*/
add_task(function* () {
// Tell initNetMonitor to enable cache. Otherwise it will assert that there were more
// than zero network requests during the page load. But when loading about:config,
// there are none.
let [,, monitor] = yield initNetMonitor("about:config", null, true);
ok(monitor, "The network monitor was opened");
yield teardown(monitor);
finish();
});

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

@ -355,6 +355,10 @@ WebConsoleActor.prototype =
this.networkMonitorChild.destroy();
this.networkMonitorChild = null;
}
if (this.stackTraceCollector) {
this.stackTraceCollector.destroy();
this.stackTraceCollector = null;
}
if (this.consoleProgressListener) {
this.consoleProgressListener.destroy();
this.consoleProgressListener = null;