diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-11-19 08:33:02 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-11-20 16:37:33 -0500 |
commit | 1bdc2ebc3c2fbfb4519eb6cb227ce189a42543d9 (patch) | |
tree | addc67bbfce6dbb39c1ae044aadb24d35774d7f3 /scripting | |
parent | fe9ffe854fd8fa7b4c0e7e22cd8cca978bd1c71f (diff) | |
download | mongo-1bdc2ebc3c2fbfb4519eb6cb227ce189a42543d9.tar.gz |
working on SERVER-2121
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/engine_spidermonkey.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripting/engine_spidermonkey.cpp b/scripting/engine_spidermonkey.cpp index 7030a7e9e34..d351f14e21f 100644 --- a/scripting/engine_spidermonkey.cpp +++ b/scripting/engine_spidermonkey.cpp @@ -391,8 +391,11 @@ namespace mongo { if ( hasJSReturn( code ) ) return false; - if ( code.find( ";" ) != string::npos && - code.find( ";" ) != code.rfind( ";" ) ) + if ( code.find( ';' ) != string::npos && + code.find( ';' ) != code.rfind( ';' ) ) + return false; + + if ( code.find( '\n') != string::npos ) return false; if ( code.find( "for(" ) != string::npos || @@ -421,6 +424,8 @@ namespace mongo { raw++; } + //cout << "RAW\n---\n" << raw << "\n---" << endl; + stringstream fname; fname << "cf_"; static int fnum = 1; |