janl commented on code in PR #5364:
URL: https://github.com/apache/couchdb/pull/5364#discussion_r1895611996
##########
share/server/util.js:
##########
@@ -116,7 +116,14 @@ var Couch = {
"Expression does not eval to a function. (" + source.toString() +
")"]);
};
},
- recursivelySeal : deepFreeze
+ recursivelySeal: function (obj) {
Review Comment:
this effectively bypasses the new deepFreeze() function we introduced for
this. Can’t we do duck-typing here and call deepFreeze if it is available and
seal if it isn’t?
##########
share/server/util.js:
##########
@@ -116,7 +116,14 @@ var Couch = {
"Expression does not eval to a function. (" + source.toString() +
")"]);
};
},
- recursivelySeal : deepFreeze
+ recursivelySeal: function (obj) {
+ seal(obj);
+ for (var propname in obj) {
Review Comment:
What does this for-loop do?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]