Skip to content

Commit

Permalink
Bug 1243696 - Fix unsafe CPOW usage for TabBar.get_handle_for_tab(). …
Browse files Browse the repository at this point in the history
…r=maja_zf
  • Loading branch information
whimboo committed Feb 2, 2016
1 parent 04b84d2 commit 455ead4
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,11 @@ def get_handle_for_tab(marionette, tab_element):
# element corresponding to the active window according to
# marionette or a similar ability should be added to marionette.
handle = marionette.execute_script("""
let win = arguments[0].linkedBrowser.contentWindowAsCPOW;
let win = arguments[0].linkedBrowser;
if (!win) {
return null;
}
return win.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIDOMWindowUtils)
.outerWindowID.toString();
return win.outerWindowID.toString();
""", script_args=[tab_element])

return handle
Expand Down

0 comments on commit 455ead4

Please sign in to comment.