From 455ead47014f65b3331020f92302f9d65d989c7f Mon Sep 17 00:00:00 2001 From: Henrik Skupin Date: Tue, 2 Feb 2016 12:04:59 +0100 Subject: [PATCH] Bug 1243696 - Fix unsafe CPOW usage for TabBar.get_handle_for_tab(). r=maja_zf --- .../firefox/firefox_puppeteer/ui/browser/tabbar.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/testing/puppeteer/firefox/firefox_puppeteer/ui/browser/tabbar.py b/testing/puppeteer/firefox/firefox_puppeteer/ui/browser/tabbar.py index d54d6e8e7501..7aa894b4f26a 100644 --- a/testing/puppeteer/firefox/firefox_puppeteer/ui/browser/tabbar.py +++ b/testing/puppeteer/firefox/firefox_puppeteer/ui/browser/tabbar.py @@ -193,13 +193,11 @@ class TabBar(UIBaseLib): # 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