diff options
Diffstat (limited to 'share')
-rw-r--r-- | share/server/main.js | 12 | ||||
-rw-r--r-- | share/www/script/couch_tests.js | 4 |
2 files changed, 14 insertions, 2 deletions
diff --git a/share/server/main.js b/share/server/main.js index ddf2a3af..df184c1c 100644 --- a/share/server/main.js +++ b/share/server/main.js @@ -74,7 +74,19 @@ while (cmd = eval(readline())) { // ] // var doc = cmd[1]; + /* + Immutable document support temporarily removed. + + Removed because the seal function no longer works on JS 1.8 arrays, + instead returning an error. The sealing is meant to prevent map + functions from modifying the same document that is passed to other map + functions. However, only map functions in the same design document are + run together, so we have a reasonable expectation they can trust each + other. Any map fun that can't be trusted can be placed in its own + design document, and it cannot affect other map functions. + recursivelySeal(doc); // seal to prevent map functions from changing doc + */ var buf = []; for (var i = 0; i < funs.length; i++) { map_results = []; diff --git a/share/www/script/couch_tests.js b/share/www/script/couch_tests.js index 32a53909..539b9a12 100644 --- a/share/www/script/couch_tests.js +++ b/share/www/script/couch_tests.js @@ -1072,7 +1072,7 @@ var tests = { var doc = {integer: 1, string: "1", array: [1, 2, 3]}; T(db.save(doc).ok); - +/* // make sure that attempting to change the document throws an error var results = db.query(function(doc) { doc.integer = 2; @@ -1085,7 +1085,7 @@ var tests = { emit(null, doc); }); T(results.total_rows == 0); - +*/ // make sure that a view cannot invoke interpreter internals such as the // garbage collector var results = db.query(function(doc) { |