[Pkg-mozext-commits] [requestpolicy] 156/257: [ref] AboutRP: use `self.*` notation
David Prévot
taffit at moszumanska.debian.org
Thu Jan 28 03:20:08 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository requestpolicy.
commit b9026704eacfd17decca8e45b18f7dae14818a65
Author: Martin Kimmerle <dev at 256k.de>
Date: Mon Nov 30 23:36:44 2015 +0100
[ref] AboutRP: use `self.*` notation
Use `self.foo = bar;` notation instead of object
initializer `var self = {foo: bar};`
---
src/content/main/about-uri.jsm | 53 +++++++++++++++++++++---------------------
1 file changed, 27 insertions(+), 26 deletions(-)
diff --git a/src/content/main/about-uri.jsm b/src/content/main/about-uri.jsm
index 27fc005..4373561 100644
--- a/src/content/main/about-uri.jsm
+++ b/src/content/main/about-uri.jsm
@@ -66,33 +66,34 @@ function getURI(aURI) {
var AboutRequestPolicy = (function() {
- let self = {
- classDescription: "about:requestpolicy",
- contractID: "@mozilla.org/network/protocol/about;1?what=requestpolicy",
- classID: Components.ID("{77d4be21-6a28-4b91-9886-15ccd83795e8}"),
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
-
- getURIFlags: function(aURI) {
- return Ci.nsIAboutModule.ALLOW_SCRIPT;
- },
-
- newChannel: function(aURI) {
- let uri = getURI(aURI)
- let channel = Services.io.newChannel(uri, null, null);
- channel.originalURI = aURI;
- return channel;
- },
-
- //
- // nsIFactory interface implementation
- //
-
- createInstance: function(outer, iid) {
- if (outer) {
- throw Cr.NS_ERROR_NO_AGGREGATION;
- }
- return self.QueryInterface(iid);
+ let self = {};
+
+
+ self.classDescription = "about:requestpolicy";
+ self.contractID = "@mozilla.org/network/protocol/about;1?what=requestpolicy";
+ self.classID = Components.ID("{77d4be21-6a28-4b91-9886-15ccd83795e8}");
+ self.QueryInterface = XPCOMUtils.generateQI([Ci.nsIAboutModule]);
+
+ self.getURIFlags = function (aURI) {
+ return Ci.nsIAboutModule.ALLOW_SCRIPT;
+ };
+
+ self.newChannel = function (aURI) {
+ let uri = getURI(aURI);
+ let channel = Services.io.newChannel(uri, null, null);
+ channel.originalURI = aURI;
+ return channel;
+ };
+
+ //----------------------------------------------------------------------------
+ // nsIFactory interface implementation
+ //----------------------------------------------------------------------------
+
+ self.createInstance = function (outer, iid) {
+ if (outer) {
+ throw Cr.NS_ERROR_NO_AGGREGATION;
}
+ return self.QueryInterface(iid);
};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/requestpolicy.git
More information about the Pkg-mozext-commits
mailing list