mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 13:37:58 +01:00
Remove a troublesome and unnecessary memoize statement.
This commit is contained in:
@@ -7,8 +7,6 @@
|
|||||||
(function () {
|
(function () {
|
||||||
function newContext(proto) {
|
function newContext(proto) {
|
||||||
let sandbox = Components.utils.Sandbox(window);
|
let sandbox = Components.utils.Sandbox(window);
|
||||||
if (jsmodules.__proto__ != window)
|
|
||||||
jsmodules.__proto__ = window;
|
|
||||||
// Hack:
|
// Hack:
|
||||||
sandbox.Object = jsmodules.Object;
|
sandbox.Object = jsmodules.Object;
|
||||||
sandbox.Math = jsmodules.Math;
|
sandbox.Math = jsmodules.Math;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ XML.ignoreWhitespace = false;
|
|||||||
XML.prettyPrinting = false;
|
XML.prettyPrinting = false;
|
||||||
|
|
||||||
const plugins = { __proto__: modules };
|
const plugins = { __proto__: modules };
|
||||||
memoize(modules, "userContext", function () newContext(modules));;
|
const userContext = newContext(modules);
|
||||||
|
|
||||||
const EVAL_ERROR = "__dactyl_eval_error";
|
const EVAL_ERROR = "__dactyl_eval_error";
|
||||||
const EVAL_RESULT = "__dactyl_eval_result";
|
const EVAL_RESULT = "__dactyl_eval_result";
|
||||||
@@ -1920,6 +1920,7 @@ const Dactyl = Module("dactyl", {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
load: function () {
|
load: function () {
|
||||||
|
jsmodules.__proto__ = window;
|
||||||
dactyl.triggerObserver("load");
|
dactyl.triggerObserver("load");
|
||||||
|
|
||||||
dactyl.log("All modules loaded", 3);
|
dactyl.log("All modules loaded", 3);
|
||||||
|
|||||||
@@ -536,7 +536,7 @@ const JavaScript = Module("javascript", {
|
|||||||
args.push(key + string);
|
args.push(key + string);
|
||||||
|
|
||||||
let compl = function (context, obj) {
|
let compl = function (context, obj) {
|
||||||
let res = completer.call(this, context, funcName, obj, args);
|
let res = completer.call(self, context, funcName, obj, args);
|
||||||
if (res)
|
if (res)
|
||||||
context.completions = res;
|
context.completions = res;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user