mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-03 13:25:46 +01:00
Fix error dispatching fullscreen autocmd again.
This commit is contained in:
@@ -143,7 +143,7 @@ var AutoCommands = Module("autocommands", {
|
|||||||
let lastPattern = null;
|
let lastPattern = null;
|
||||||
var { url, doc } = args;
|
var { url, doc } = args;
|
||||||
if (url)
|
if (url)
|
||||||
uri = util.newURI(url);
|
uri = util.createURI(url);
|
||||||
else
|
else
|
||||||
var { uri, doc } = buffer;
|
var { uri, doc } = buffer;
|
||||||
|
|
||||||
|
|||||||
@@ -964,7 +964,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
|||||||
* @returns {nsIURI}
|
* @returns {nsIURI}
|
||||||
*/
|
*/
|
||||||
// FIXME: createURI needed too?
|
// FIXME: createURI needed too?
|
||||||
newURI: function (uri, charset, base) services.io.newURI(uri, charset, base),
|
newURI: function newURI(uri, charset, base) this.withProperErrors("newURI", services.io, uri, charset, base),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes leading garbage prepended to URIs by the subscript
|
* Removes leading garbage prepended to URIs by the subscript
|
||||||
@@ -1765,6 +1765,23 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
|||||||
return res.filter(function (h) !set.add(seen, h.spec));
|
return res.filter(function (h) !set.add(seen, h.spec));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wraps native exceptions thrown by the called function so that a
|
||||||
|
* proper stack trace may be retrieved from them.
|
||||||
|
*
|
||||||
|
* @param {function|string} meth The method to call.
|
||||||
|
* @param {object} self The 'this' object of the method.
|
||||||
|
* @param ... Arguments to pass to *meth*.
|
||||||
|
*/
|
||||||
|
withProperErrors: function withProperErrors(meth, self) {
|
||||||
|
try {
|
||||||
|
return (callable(meth) ? meth : self[meth]).apply(self, Array.slice(arguments, withProperErrors.length));
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
throw e.stack ? e : Error(e);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts an E4X XML literal to a DOM node. Any attribute named
|
* Converts an E4X XML literal to a DOM node. Any attribute named
|
||||||
* highlight is present, it is transformed into dactyl:highlight,
|
* highlight is present, it is transformed into dactyl:highlight,
|
||||||
|
|||||||
Reference in New Issue
Block a user