From 8e8d482e29bf5ec55f58816407b128cc618e3fbf Mon Sep 17 00:00:00 2001 From: Michael Kaply <345868+mkaply@users.noreply.github.com> Date: Thu, 9 Jan 2020 09:50:17 -0600 Subject: [PATCH] Handle removal of nsIDOMWindow QI --- cck2/modules/CCK2.jsm | 2 +- cck2/modules/CCK2AboutAddonsOverlay.jsm | 2 +- cck2/modules/CCK2AboutDialogOverlay.jsm | 2 +- cck2/modules/CCK2AboutHomeFramescript.js | 2 +- cck2/modules/CCK2AboutSupportOverlay.jsm | 2 +- cck2/modules/CCK2BrowserOverlay.jsm | 2 +- cck2/modules/CCK2PreferencesOverlay.jsm | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cck2/modules/CCK2.jsm b/cck2/modules/CCK2.jsm index 52b37e6..f1fa7aa 100644 --- a/cck2/modules/CCK2.jsm +++ b/cck2/modules/CCK2.jsm @@ -1441,7 +1441,7 @@ function updatePermissions(permissions) { var documentObserver = { observe: function observe(subject, topic, data) { if (subject instanceof Ci.nsIDOMWindow) { - var win = subject.QueryInterface(Components.interfaces.nsIDOMWindow); + var win = subject; if (topic == "chrome-document-global-created" || (topic == "content-document-global-created" && win.document.documentURIObject.scheme == "about")) { win.addEventListener("load", function onLoad(event) { diff --git a/cck2/modules/CCK2AboutAddonsOverlay.jsm b/cck2/modules/CCK2AboutAddonsOverlay.jsm index ea1bbd1..0a9a3a3 100644 --- a/cck2/modules/CCK2AboutAddonsOverlay.jsm +++ b/cck2/modules/CCK2AboutAddonsOverlay.jsm @@ -17,7 +17,7 @@ var observer = { observe: function observe(subject, topic, data) { switch (topic) { case "chrome-document-global-created": - var win = subject.QueryInterface(Components.interfaces.nsIDOMWindow); + var win = subject; win.addEventListener("load", function onLoad(event) { win.removeEventListener("load", onLoad, false); var doc = event.target; diff --git a/cck2/modules/CCK2AboutDialogOverlay.jsm b/cck2/modules/CCK2AboutDialogOverlay.jsm index 630e27b..4033d9e 100644 --- a/cck2/modules/CCK2AboutDialogOverlay.jsm +++ b/cck2/modules/CCK2AboutDialogOverlay.jsm @@ -12,7 +12,7 @@ var observer = { observe: function observe(subject, topic, data) { switch (topic) { case "chrome-document-global-created": - var win = subject.QueryInterface(Components.interfaces.nsIDOMWindow); + var win = subject; win.addEventListener("load", function onLoad(event) { win.removeEventListener("load", onLoad, false); var doc = event.target; diff --git a/cck2/modules/CCK2AboutHomeFramescript.js b/cck2/modules/CCK2AboutHomeFramescript.js index 98e5b3d..ca9af13 100644 --- a/cck2/modules/CCK2AboutHomeFramescript.js +++ b/cck2/modules/CCK2AboutHomeFramescript.js @@ -16,7 +16,7 @@ var observer = { observe: function observe(subject, topic, data) { switch (topic) { case "content-document-global-created": - var win = subject.QueryInterface(Components.interfaces.nsIDOMWindow); + var win = subject; win.addEventListener("load", function onLoad(event) { win.removeEventListener("load", onLoad, false); var doc = event.target; diff --git a/cck2/modules/CCK2AboutSupportOverlay.jsm b/cck2/modules/CCK2AboutSupportOverlay.jsm index 4da8fba..e7361c2 100644 --- a/cck2/modules/CCK2AboutSupportOverlay.jsm +++ b/cck2/modules/CCK2AboutSupportOverlay.jsm @@ -17,7 +17,7 @@ var observer = { observe: function observe(subject, topic, data) { switch (topic) { case "chrome-document-global-created": - var win = subject.QueryInterface(Components.interfaces.nsIDOMWindow); + var win = subject; win.addEventListener("load", function onLoad(event) { win.removeEventListener("load", onLoad, false); var doc = event.target; diff --git a/cck2/modules/CCK2BrowserOverlay.jsm b/cck2/modules/CCK2BrowserOverlay.jsm index 52d59fb..beb519b 100644 --- a/cck2/modules/CCK2BrowserOverlay.jsm +++ b/cck2/modules/CCK2BrowserOverlay.jsm @@ -18,7 +18,7 @@ var observer = { observe: function observe(subject, topic, data) { switch (topic) { case "chrome-document-global-created": - var win = subject.QueryInterface(Components.interfaces.nsIDOMWindow); + var win = subject; win.addEventListener("load", function onLoad(event) { win.removeEventListener("load", onLoad, false); var doc = event.target; diff --git a/cck2/modules/CCK2PreferencesOverlay.jsm b/cck2/modules/CCK2PreferencesOverlay.jsm index f64149d..7f2c06b 100644 --- a/cck2/modules/CCK2PreferencesOverlay.jsm +++ b/cck2/modules/CCK2PreferencesOverlay.jsm @@ -20,7 +20,7 @@ var observer = { observe: function observe(subject, topic, data) { switch (topic) { case "chrome-document-global-created": - var win = subject.QueryInterface(Components.interfaces.nsIDOMWindow); + var win = subject; win.addEventListener("load", function onLoad(event) { win.removeEventListener("load", onLoad, false); var doc = event.target;