SERVER-612 fix v8 issue

This commit is contained in:
Aaron
2010-02-17 13:42:16 -08:00
parent 1c55567e76
commit 1d97a69eae

View File

@@ -85,9 +85,10 @@ namespace mongo {
internalFieldObjects->SetInternalFieldCount( 1 );
if ( !o.IsEmpty() ) {
// do nothing
readOnly = false;
} else if ( array ) {
// NOTE Looks like it's impossible to add interceptors to v8 arrays.
readOnly = false;
o = v8::Array::New();
} else if ( !readOnly ) {
o = v8::Object::New();
@@ -254,7 +255,7 @@ namespace mongo {
}
if ( !array && readOnly ) {
if ( readOnly ) {
readOnlyObjects->SetNamedPropertyHandler( 0, NamedReadOnlySet, 0, NamedReadOnlyDelete );
readOnlyObjects->SetIndexedPropertyHandler( 0, IndexedReadOnlySet, 0, IndexedReadOnlyDelete );
}