Skip to content

Commit

Permalink
SERVER-612 fix v8 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
astaple committed Feb 17, 2010
1 parent 1c55567 commit 1d97a69
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripting/v8_wrapper.cpp
Expand Up @@ -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();
Expand Down Expand Up @@ -254,7 +255,7 @@ namespace mongo {

}

if ( !array && readOnly ) {
if ( readOnly ) {
readOnlyObjects->SetNamedPropertyHandler( 0, NamedReadOnlySet, 0, NamedReadOnlyDelete );
readOnlyObjects->SetIndexedPropertyHandler( 0, IndexedReadOnlySet, 0, IndexedReadOnlyDelete );
}
Expand Down

0 comments on commit 1d97a69

Please sign in to comment.