Bug 1124217 - don't gather telemetry for windows that have died, r=mconley

--HG--
extra : rebase_source : a90e7ffbba7de812462eb6ae1c1ea702cb417c6a
This commit is contained in:
Gijs Kruitbosch 2015-04-16 11:41:19 +01:00
parent c5783ea4a3
commit bc69601a40

View File

@ -287,9 +287,11 @@ this.BrowserUITelemetry = {
});
Services.search.init(rv => {
// If there are no such windows, we're out of luck. :(
this._firstWindowMeasurements = win ? this._getWindowMeasurements(win, rv)
: {};
// If there are no such windows (or we've just about found one
// but it's closed already), we're out of luck. :(
let hasWindow = win && !win.closed;
this._firstWindowMeasurements = hasWindow ? this._getWindowMeasurements(win, rv)
: {};
});
},