Bug 1240900 - Use outerWindowID directly from browser. r=ochameau
MozReview-Commit-ID: JuJNSScaJEs
--- a/devtools/client/framework/target.js
+++ b/devtools/client/framework/target.js
@@ -420,17 +420,17 @@ TabTarget.prototype = {
this._client.connect()
.then(() => this._client.getTab({ tab: this.tab }))
.then(response => {
this._form = response.tab;
this._url = this._form.url;
this._title = this._form.title;
attachTab();
- });
+ }, e => this._remote.reject(e));
} else if (this.isTabActor) {
// In the remote debugging case, the protocol connection will have been
// already initialized in the connection screen code.
attachTab();
} else {
// AddonActor and chrome debugging on RootActor doesn't inherits from
// TabActor and doesn't need to be attached.
attachConsole();
--- a/devtools/shared/client/main.js
+++ b/devtools/shared/client/main.js
@@ -1635,20 +1635,17 @@ RootClient.prototype = {
packet.tabId = aFilter.tabId;
} else if ("tab" in aFilter) {
let browser = aFilter.tab.linkedBrowser;
if (browser.frameLoader.tabParent) {
// Tabs in child process
packet.tabId = browser.frameLoader.tabParent.tabId;
} else {
// Tabs in parent process
- let windowUtils = browser.contentWindow
- .QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindowUtils);
- packet.outerWindowID = windowUtils.outerWindowID;
+ packet.outerWindowID = browser.outerWindowID;
}
} else {
// Throw if a filter object have been passed but without
// any clearly idenfified filter.
throw new Error("Unsupported argument given to getTab request");
}
}