diff lib/js/urweb.js @ 1798:10a2cb93d175

Removed evaluation of js function name strings. (from Vladimir Shabanov)
author Adam Chlipala <adam@chlipala.net>
date Sun, 29 Jul 2012 12:54:17 -0400
parents 4671afac15af
children e3ec868567ce
line wrap: on
line diff
--- a/lib/js/urweb.js	Sun Jul 29 12:27:13 2012 -0400
+++ b/lib/js/urweb.js	Sun Jul 29 12:54:17 2012 -0400
@@ -1711,10 +1711,10 @@
             break;
         case "f":
             if (e.a == null)
-                e = {c: "c", v: (eval(e.f))()};
+                e = {c: "c", v: e.f()};
             else {
                 var args = [];
-                stack = cons({c: "f", f: eval(e.f), args: args, pos: 0, a: e.a.next}, stack);
+                stack = cons({c: "f", f: e.f, args: args, pos: 0, a: e.a.next}, stack);
                 if (!e.a.data.c) alert("[2] fr.f = " + e.f + "; 0 = " + e.a.data);
                 e = e.a.data;
             }