summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rw-r--r--share/server/mimeparse.js2
-rw-r--r--share/server/util.js5
-rw-r--r--share/www/script/couch_test_runner.js15
3 files changed, 2 insertions, 20 deletions
diff --git a/share/server/mimeparse.js b/share/server/mimeparse.js
index 42b600fa..3642a194 100644
--- a/share/server/mimeparse.js
+++ b/share/server/mimeparse.js
@@ -97,7 +97,7 @@ var Mimeparse = (function() {
if ((type == targetType || type == "*" || targetType == "*") &&
(subtype == targetSubtype || subtype == "*" || targetSubtype == "*")) {
var matchCount = 0;
- for (var param in targetParams) {
+ for (param in targetParams) {
if (param != 'q' && params[param] && params[param] == targetParams[param]) {
matchCount += 1;
}
diff --git a/share/server/util.js b/share/server/util.js
index f6fa60bb..0b812fe1 100644
--- a/share/server/util.js
+++ b/share/server/util.js
@@ -63,11 +63,6 @@ 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) {
diff --git a/share/www/script/couch_test_runner.js b/share/www/script/couch_test_runner.js
index e14640b6..55a6533f 100644
--- a/share/www/script/couch_test_runner.js
+++ b/share/www/script/couch_test_runner.js
@@ -414,23 +414,10 @@ function waitForSuccess(fun, tag) {
function waitForRestart() {
var waiting = true;
- // Wait for the server to go down but don't
- // wait too long because we might miss the
- // unavailable period.
- var count = 25;
- while (waiting && count > 0) {
- count--;
- try {
- CouchDB.request("GET", "/");
- } catch(e) {
- waiting = false;
- }
- }
- // Wait for it to come back up
- waiting = true;
while (waiting) {
try {
CouchDB.request("GET", "/");
+ CouchDB.request("GET", "/");
waiting = false;
} catch(e) {
// the request will fail until restart completes