[or-cvs] [torbutton/master 11/31] Fix issue with cssblocker. Needed some QI.
mikeperry at torproject.org
mikeperry at torproject.org
Tue Jan 4 07:02:19 UTC 2011
Author: Mike Perry <mikeperry-git at fscked.org>
Date: Mon, 13 Dec 2010 23:38:15 -0800
Subject: Fix issue with cssblocker. Needed some QI.
Commit: 6d3185447b0e36cca45f36d218cdb6d05a563949
---
src/components/cssblocker.js | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/components/cssblocker.js b/src/components/cssblocker.js
index 8ee8375..51f7b98 100644
--- a/src/components/cssblocker.js
+++ b/src/components/cssblocker.js
@@ -33,6 +33,8 @@ const Cr = Components.results;
const Cc = Components.classes;
const Ci = Components.interfaces;
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+
// Retrieves the window object for a node or returns null if it isn't possible
function getWindow(node) {
if (node && node.nodeType != DNode.DOCUMENT_NODE)
@@ -445,7 +447,13 @@ ContentPolicy.prototype = {
_xpcom_categories: [{category:"content-policy"}],
classID: CSSB_CID,
contractID: CSSB_CONTRACTID,
- classDescription: "Torbutton Content Policy"
+ classDescription: "Torbutton Content Policy",
+
+ // QueryInterface implementation, e.g. using the generateQI helper
+ QueryInterface: XPCOMUtils.generateQI(
+ [ Components.interfaces.nsIObserver,
+ Components.interfaces.nsISupports,
+ Components.interfaces.nsIContentPolicy ])
};
@@ -453,7 +461,6 @@ ContentPolicy.prototype = {
* XPCOMUtils.generateNSGetFactory was introduced in Mozilla 2 (Firefox 4).
* XPCOMUtils.generateNSGetModule is for Mozilla 1.9.2 (Firefox 3.6).
*/
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
if (XPCOMUtils.generateNSGetFactory)
var NSGetFactory = XPCOMUtils.generateNSGetFactory([ContentPolicy]);
else
--
1.7.1
More information about the tor-commits
mailing list