[Pkg-mozext-commits] [greasemonkey] 10/25: Never ever run scripts in a chrome context window.
David Prévot
taffit at moszumanska.debian.org
Wed Sep 17 21:14:01 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository greasemonkey.
commit 908a666e768f3d143109e114c020155633fc7116
Author: Anthony Lieuallen <arantius at gmail.com>
Date: Fri Aug 22 11:42:15 2014 -0400
Never ever run scripts in a chrome context window.
Fixes #1988
---
components/greasemonkey.js | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/components/greasemonkey.js b/components/greasemonkey.js
index c644ca9..6f1a544 100644
--- a/components/greasemonkey.js
+++ b/components/greasemonkey.js
@@ -474,6 +474,14 @@ service.prototype.ignoreNextScript = function() {
service.prototype.injectScripts = function(
scripts, url, wrappedContentWin
) {
+ try {
+ wrappedContentWin.QueryInterface(Ci.nsIDOMChromeWindow);
+ // Never ever inject scripts into a chrome context window.
+ return;
+ } catch (e) {
+ // Ignore, it's good if we can't QI to a chrome window.
+ }
+
var chromeWin = getChromeWinForContentWin(wrappedContentWin);
var firebugConsole = getFirebugConsole(wrappedContentWin, chromeWin);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/greasemonkey.git
More information about the Pkg-mozext-commits
mailing list