Bug 1136378 - Use a browser's outerWindowId property rather than a CPOW to identify marionette's content listeners.;r=mconley

This commit is contained in:
Chris Manchester 2015-02-24 15:52:52 -08:00
parent a39b7dafd3
commit d56b851467

View File

@ -1447,16 +1447,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;
},