diff options
author | Robert Newson <rnewson@apache.org> | 2011-10-06 20:49:17 +0100 |
---|---|---|
committer | Robert Newson <rnewson@apache.org> | 2011-10-06 20:49:17 +0100 |
commit | a628a43b58c7f85e228b148cea5d74a8b24bff70 (patch) | |
tree | 9a80595a0289b4a4dce73102c2b1bd534f937005 /share/server/util.js | |
parent | 4818fdd3269a3082a193ec69f4e8e39d95c15e86 (diff) |
Revert "Remove SpiderMonkey 1.8.5 compatibility"
This reverts commit 5b558c81ed9709fb286a6821e9ae6d6478012c2c.
Diffstat (limited to 'share/server/util.js')
-rw-r--r-- | share/server/util.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/share/server/util.js b/share/server/util.js index 0b812fe1..f6fa60bb 100644 --- a/share/server/util.js +++ b/share/server/util.js @@ -63,6 +63,11 @@ var Couch = { }, compileFunction : function(source, ddoc) { if (!source) throw(["error","not_found","missing function"]); + // Some newer SpiderMonkey's appear to not like evaluating + // an anonymous function at global scope. Simple fix just + // wraps the source with parens so the function object is + // returned correctly. + source = "(" + source + ")"; try { if (sandbox) { if (ddoc) { |