[Pkg-mozext-commits] [greasemonkey] 04/24: Update installPolicy.js
David Prévot
taffit at moszumanska.debian.org
Sat May 30 13:32:04 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository greasemonkey.
commit 6c9cf4cc3d8cd61a8232c3d7f60535ce44700167
Author: janekptacijarabaci <janekptacijarabaci at users.noreply.github.com>
Date: Fri May 22 18:17:47 2015 +0200
Update installPolicy.js
---
modules/installPolicy.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/installPolicy.js b/modules/installPolicy.js
index 58ad5bc..dcb5619 100644
--- a/modules/installPolicy.js
+++ b/modules/installPolicy.js
@@ -8,6 +8,7 @@ var Ci = Components.interfaces;
var Cu = Components.utils;
var Cr = Components.results;
+Cu.import('resource://gre/modules/Services.jsm');
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
Cu.import('resource://greasemonkey/util.js');
@@ -93,8 +94,9 @@ var InstallPolicy = {
}
var messageManager = GM_util.findMessageManager(aContext);
+ var cpmm = Services.cpmm ? Services.cpmm : messageManager;
- var tmpResult = messageManager.sendSyncMessage(
+ var tmpResult = cpmm.sendSyncMessage(
'greasemonkey:url-is-temp-file', {'url': aContentURI.spec});
if (tmpResult.length && tmpResult[0]) {
return ret;
@@ -107,7 +109,7 @@ var InstallPolicy = {
} else {
ret = Ci.nsIContentPolicy.REJECT_REQUEST;
messageManager.sendAsyncMessage('greasemonkey:script-install', {
- 'referer': aOriginURI.spec,
+ 'referer': aOriginURI ? aOriginURI.spec : null,
'url': aContentURI.spec,
});
}
--
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