diff options
author | Aaron <aaron@10gen.com> | 2010-03-09 10:10:44 -0800 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2010-03-09 10:10:44 -0800 |
commit | bec48b040a12864ec893157bcffe5d2702fcd3f4 (patch) | |
tree | 69526763d4bac5c57cc9654e539b424c72d70984 | |
parent | dfe8582685fd09316b8fad70f80512f3fa611285 (diff) | |
download | mongo-bec48b040a12864ec893157bcffe5d2702fcd3f4.tar.gz |
SERVER-705 revert round trip timestamp code from v8
-rw-r--r-- | scripting/v8_wrapper.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/scripting/v8_wrapper.cpp b/scripting/v8_wrapper.cpp index 1536cedee28..4a1f0a1d6d6 100644 --- a/scripting/v8_wrapper.cpp +++ b/scripting/v8_wrapper.cpp @@ -273,27 +273,6 @@ namespace mongo { } if ( value->IsObject() ){ - // The user could potentially modify the fields of these special objects, - // wreaking havoc when we attempt to reinterpret them. Not doing any validation - // for now... - Local< v8::Object > obj = value->ToObject(); - if ( obj->InternalFieldCount() && obj->GetInternalField( 0 )->IsNumber() ) { - switch( obj->GetInternalField( 0 )->ToInt32()->Value() ) { // NOTE Uint32's Value() gave me a linking error, so going with this instead - case Timestamp: - b.appendTimestamp( sname.c_str(), - Date_t( obj->Get( v8::String::New( "t" ) )->ToNumber()->Value() ), - obj->Get( v8::String::New( "i" ) )->ToInt32()->Value() ); - return; - case MinKey: - b.appendMinKey( sname.c_str() ); - return; - case MaxKey: - b.appendMaxKey( sname.c_str() ); - return; - default: - assert( "invalid internal field" == 0 ); - } - } string s = toSTLString( value ); if ( s.size() && s[0] == '/' ){ s = s.substr( 1 ); |