Bug 1430077 - Remove global outerWindowID in frame script. r?whimboo
outerWindowID is no longer used for adding message listeners,
which means we do not need to store it globally.
MozReview-Commit-ID: HZ0oY7ozwnu
--- a/testing/marionette/listener.js
+++ b/testing/marionette/listener.js
@@ -41,17 +41,16 @@ const {ContentEventObserverService} = Cu
Cu.import("chrome://marionette/content/interaction.js");
Cu.import("chrome://marionette/content/legacyaction.js");
Cu.import("chrome://marionette/content/navigate.js");
Cu.import("chrome://marionette/content/proxy.js");
Cu.import("chrome://marionette/content/session.js");
Cu.importGlobalProperties(["URL"]);
-let outerWindowID = null;
let curContainer = {frame: content, shadowRoot: null};
// Listen for click event to indicate one click has happened, so actions
// code can send dblclick event, also resetClick and cancelTimer
// after dblclick has happened.
addEventListener("click", event.DoubleClickTracker.setClick);
addEventListener("dblclick", event.DoubleClickTracker.resetClick);
addEventListener("dblclick", event.DoubleClickTracker.cancelTimer);
@@ -442,17 +441,17 @@ const loadListener = {
};
/**
* Called when listener is first started up. The listener sends its
* unique window ID and its current URI to the actor. If the actor returns
* an ID, we start the listeners. Otherwise, nothing happens.
*/
function registerSelf() {
- outerWindowID = winUtil.outerWindowID;
+ let {outerWindowID} = winUtil;
logger.debug(`Register listener.js for window ${outerWindowID}`);
sandboxes.clear();
curContainer = {
frame: content,
shadowRoot: null,
};
legacyactions.mouseEventsOnly = false;