1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-13 19:15:45 +01:00

Turn JS completion caching back on

This commit is contained in:
Kris Maglione
2008-11-22 20:58:56 +00:00
parent 5db27607ad
commit 76a5b4cf7a
3 changed files with 42 additions and 41 deletions

View File

@@ -383,7 +383,10 @@ const liberator = (function () //{{{
{
args = args.string;
let method = args[0] == ":" ? "execute" : "eval";
if (args[0] == ":")
var method = function () liberator.execute(args);
else
method = liberator.eval("(function () {" + args + "})");
try
{
@@ -395,7 +398,7 @@ const liberator = (function () //{{{
for (let i in util.interruptableRange(0, count, 500))
{
let now = Date.now();
liberator[method](args);
method();
total += Date.now() - now;
}
@@ -437,10 +440,7 @@ const liberator = (function () //{{{
else
{
var beforeTime = Date.now();
if (args && args[0] == ":")
liberator.execute(args);
else
liberator.eval(args);
method();
if (special)
return;