mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 874023 - GCLI: context.environment.window not always defined when running GCLI commands; r=mratcliffe
This commit is contained in:
parent
8b9f1e63f0
commit
2e0e758c94
@ -320,8 +320,9 @@ Toolbox.prototype = {
|
||||
}
|
||||
|
||||
let toolbarSpec = CommandUtils.getCommandbarSpec("devtools.toolbox.toolbarSpec");
|
||||
let environment = { chromeDocument: this.target.tab.ownerDocument };
|
||||
let requisition = new Requisition(environment);
|
||||
let env = CommandUtils.createEnvironment(this.target.tab.ownerDocument,
|
||||
this.target.window.document);
|
||||
let requisition = new Requisition(env);
|
||||
|
||||
let buttons = CommandUtils.createButtons(toolbarSpec, this._target, this.doc, requisition);
|
||||
|
||||
|
@ -156,7 +156,7 @@ let CommandUtils = {
|
||||
chromeWindow: chromeDocument.defaultView,
|
||||
|
||||
document: contentDocument,
|
||||
window: contentDocument.defaultView
|
||||
window: contentDocument != null ? contentDocument.defaultView : undefined
|
||||
};
|
||||
|
||||
Object.defineProperty(environment, "target", {
|
||||
|
Loading…
Reference in New Issue
Block a user