complete backport of COUCHDB-288
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/0.9.x@882928 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/share/www/script/test/show_documents.js b/share/www/script/test/show_documents.js
index 8c4ad35..0930667 100644
--- a/share/www/script/test/show_documents.js
+++ b/share/www/script/test/show_documents.js
@@ -110,7 +110,7 @@
// Becase Safari can't stand to see that dastardly
// E4X outside of a string. Outside of tests you
// can just use E4X literals.
- this.eval('xml.node.@foo = doc.word');
+ eval('xml.node.@foo = doc.word');
return {
body: xml
};
diff --git a/src/couchdb/couch_js.c b/src/couchdb/couch_js.c
index d8f0ab5..a94091e 100644
--- a/src/couchdb/couch_js.c
+++ b/src/couchdb/couch_js.c
@@ -229,7 +229,7 @@
*rval = OBJECT_TO_JSVAL(sandbox);
ok = JS_TRUE;
} else {
- ok = JS_EvaluateUCScript(sub_context, sandbox, src, srclen, NULL, -1,
+ ok = JS_EvaluateUCScript(sub_context, sandbox, src, srclen, NULL, 0,
rval);
ok = JS_TRUE;
}