From 34ba230324bb329ce5ed54d703dcb4d84a65ab86 Mon Sep 17 00:00:00 2001 From: "Paul J. Davis" Date: Tue, 6 Sep 2011 15:27:10 -0500 Subject: Updated CouchJS to support SpiderMonkey 1.8.5 This is tested against the 1.7.0, 1.8.0rc1, and 1.8.5 tarballs from Mozilla's FTP directory. It's mostly the same code from trunk minus a few tweaks to get it past a couple type errors using c++ instead of cc. --- couchjs/js/util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'couchjs/js/util.js') diff --git a/couchjs/js/util.js b/couchjs/js/util.js index e4386701..65e3bb06 100644 --- a/couchjs/js/util.js +++ b/couchjs/js/util.js @@ -91,9 +91,9 @@ var Couch = { } sandbox.require = require; } - var functionObject = evalcx(source, sandbox); + var functionObject = evalcx("(" + source + ")", sandbox); } else { - var functionObject = eval(source); + var functionObject = eval("(" + source + ")"); } } catch (err) { throw(["error", "compilation_error", err.toSource() + " (" + source + ")"]); -- cgit v1.2.3