fix comment parsing in v8

This commit is contained in:
Eliot Horowitz
2010-11-29 01:50:57 -05:00
parent 4da350d1f6
commit 4e51d779c6
4 changed files with 19 additions and 12 deletions

View File

@@ -258,7 +258,7 @@ namespace mongo {
}
Local< v8::Function > V8Scope::__createFunction( const char * raw ){
for(; isspace( *raw ); ++raw ); // skip whitespace
raw = jsSkipWhiteSpace( raw );
string code = raw;
if ( !hasFunctionIdentifier( code ) ) {
if ( code.find( "\n" ) == string::npos &&