1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 18:42:27 +01:00

Merge changes from bootstrapped.

This commit is contained in:
Kris Maglione
2010-12-25 16:00:56 -05:00
parent ce13a4629e
commit dca9f2df86
27 changed files with 82 additions and 67 deletions

View File

@@ -13,19 +13,19 @@ if (!JSMLoader)
dump("dactyl: load: " + url + "\n");
if (this.stale[url]) {
delete this.stale[url];
dump("dactyl: load stale\n");
let global = this.globals[url];
for each (let prop in Object.getOwnPropertyNames(global))
try {
if (!set.has(this.builtin, prop) && [this, set].indexOf(global[prop]) < 0)
if (!set.has(this.builtin, prop) &&
[this, set].indexOf(Object.getOwnPropertyDescriptor(global, prop).value) < 0)
delete global[prop];
}
catch (e) {}
Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
.getService(Components.interfaces.mozIJSSubScriptLoader)
.loadSubScript(url, this.globals[url]);
.loadSubScript(url, global);
dump("dactyl: load reloaded: " + url + "\n");
}
Components.utils.import(url, target);
@@ -859,10 +859,10 @@ Class.prototype = {
*/
timeout: function (callback, timeout) {
const self = this;
let notify = { notify: function notify(timer) { try { callback.apply(self); } catch (e) { util.reportError(e); } } };
let timer = services.Timer();
timer.initWithCallback(notify, timeout || 0, timer.TYPE_ONE_SHOT);
return timer;
function notify(timer) {
util.trapErrors(callback, self);
}
return services.Timer(notify, timeout || 0, services.Timer.TYPE_ONE_SHOT);;
}
};
memoize(Class.prototype, "closure", function () {