Bug 1227139 - Fix the webconsole for addon and browser content toolbox by handling a missing performance property on this.window. r=bgrins

This commit is contained in:
Alexandre Poirot 2015-11-25 07:54:26 -08:00
parent 8d7f0946d5
commit e4a83f8b2f

View File

@ -158,8 +158,12 @@ WebConsoleActor.prototype =
},
/**
* The window we work with.
* @type nsIDOMWindow
* The window or sandbox we work with.
* Note that even if it is named `window` it refers to the current
* global we are debugging, which can be a Sandbox for addons
* or browser content toolbox.
*
* @type nsIDOMWindow or Sandbox
*/
get window() {
if (this.parentActor.isRootActor) {
@ -736,7 +740,8 @@ WebConsoleActor.prototype =
break;
}
let requestStartTime = this.window ?
// See `window` definition. It isn't always a DOM Window.
let requestStartTime = this.window && this.window.performance ?
this.window.performance.timing.requestStart : 0;
let cache = this.consoleAPIListener