diff options
author | Kris Maglione <maglione.k@gmail.com> | 2010-12-28 20:45:00 -0500 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2010-12-28 20:45:00 -0500 |
commit | cd21743661a4b4388584bc594c3b8f3f38f9774c (patch) | |
tree | 64f3cb2ef058f4030ae0a668dd211b8fb60dcc0f /common/components | |
parent | f3304401380946743e870c2e3742952f54da5b9f (diff) | |
download | pentadactyl-cd21743661a4b4388584bc594c3b8f3f38f9774c.tar.gz |
Fix error thrown in protocols.js.
Diffstat (limited to 'common/components')
-rw-r--r-- | common/components/protocols.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/common/components/protocols.js b/common/components/protocols.js index 6b4f9c7f..66d283f6 100644 --- a/common/components/protocols.js +++ b/common/components/protocols.js @@ -27,7 +27,7 @@ function dataURL(type, data) "data:" + (type || "application/xml;encoding=UTF-8" function makeChannel(url, orig) { try { if (url == null) - return fakeChannel(); + return fakeChannel(orig); if (typeof url === "function") url = dataURL.apply(null, url()); let uri = ioService.newURI(url, null, null); @@ -38,7 +38,7 @@ function makeChannel(url, orig) { return channel; } catch (e) { - Components.utils.reportError(e); + util.reportError(e); throw e; } } @@ -87,7 +87,7 @@ ChromeData.prototype = { return makeChannel(uri.spec.replace(/^.*?:\/*(.*)(?:#.*)?/, "data:$1"), uri); } catch (e) {} - return fakeChannel(); + return fakeChannel(uri); } }; @@ -102,6 +102,7 @@ function Dactyl() { Cu.import("resource://dactyl/base.jsm"); require(global, "prefs"); + require(global, "util"); ["appName", "fileExt", "host", "hostbin", "idName", "name", "version"].forEach(function (pref) this.__defineGetter__(pref, function () prefs.get("extensions.dactyl." + pref, "dactyl")), @@ -132,7 +133,7 @@ Dactyl.prototype = { | Ci.nsIProtocolHandler.URI_IS_UI_RESOURCE | Ci.nsIProtocolHandler.URI_IS_LOCAL_RESOURCE, - newURI: function (spec, charset, baseURI) { + newURI: function newURI(spec, charset, baseURI) { var uri = Cc["@mozilla.org/network/standard-url;1"] .createInstance(Ci.nsIStandardURL) .QueryInterface(Ci.nsIURI); @@ -140,7 +141,7 @@ Dactyl.prototype = { return uri; }, - newChannel: function (uri) { + newChannel: function newChannel(uri) { try { if (uri.host != "content" && !("all" in this.FILE_MAP)) return redirect(uri.spec, uri, 1); @@ -171,7 +172,7 @@ Dactyl.prototype = { entry: "m-dactyl" }], - observe: function (subject, topic, data) { + observe: function observe(subject, topic, data) { if (topic === "profile-after-change") { Cu.import("resource://dactyl/base.jsm"); require(global, "overlay"); |