SERVER-3630: 'this' supplied to map function not read only

This commit is contained in:
agirbal
2011-10-04 16:29:59 -07:00
parent 34174c2f49
commit 2fb57a8d5e
5 changed files with 7 additions and 7 deletions

View File

@@ -939,7 +939,7 @@ namespace mongo {
}
else if ( array ) {
// NOTE Looks like it's impossible to add interceptors to v8 arrays.
readOnly = false;
// so array itself will never be read only, but its values can be
o = v8::Array::New();
}
else if ( !readOnly ) {
@@ -1131,7 +1131,7 @@ namespace mongo {
}
if ( readOnly ) {
if ( !array && readOnly ) {
readOnlyObjects->SetNamedPropertyHandler( 0, NamedReadOnlySet, 0, NamedReadOnlyDelete );
readOnlyObjects->SetIndexedPropertyHandler( 0, IndexedReadOnlySet, 0, IndexedReadOnlyDelete );
}