Skip to content

Commit

Permalink
Bug 1136378 - Use a browser's outerWindowId property rather than a CP…
Browse files Browse the repository at this point in the history
…OW to identify marionette's content listeners.;r=mconley
  • Loading branch information
rmottola committed Aug 20, 2019
1 parent 8b2f433 commit 0c7174c
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions testing/marionette/marionette-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -1454,16 +1454,11 @@ MarionetteServerConnection.prototype = {
return this._browserIds.get(permKey);
}

let contentWindow = browser.contentWindowAsCPOW;
if (contentWindow !== null && !Cu.isDeadWrapper(contentWindow)) {
let winId = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils)
.outerWindowID;
if (winId) {
winId += "";
this._browserIds.set(permKey, winId);
return winId;
}
let winId = browser.outerWindowID;
if (winId) {
winId += "";
this._browserIds.set(permKey, winId);
return winId;
}
return null;
},
Expand Down

0 comments on commit 0c7174c

Please sign in to comment.