diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-11-22 00:53:00 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-11-22 00:53:00 -0500 |
commit | 99647ebeb059a830da004fbba74fc3a99bc42c21 (patch) | |
tree | 71f92b1dbec9f9ff5897b40b7ebcf8a48d941609 /scripting | |
parent | 6ad12a6bea3ce8468e5d3fadaadefc7697ed756a (diff) | |
download | mongo-99647ebeb059a830da004fbba74fc3a99bc42c21.tar.gz |
fix comments in embedded code SERVER-2121
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/engine_spidermonkey.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/scripting/engine_spidermonkey.cpp b/scripting/engine_spidermonkey.cpp index d351f14e21f..fd3094a4c43 100644 --- a/scripting/engine_spidermonkey.cpp +++ b/scripting/engine_spidermonkey.cpp @@ -419,9 +419,17 @@ namespace mongo { JSFunction * _compileFunction( const char * raw , JSObject * assoc , const char *& gcName ){ if ( ! assoc ) assoc = JS_GetGlobalObject( _context ); + + while ( raw[0] ){ + while (isspace(*raw)) { + raw++; + } - while (isspace(*raw)) { - raw++; + if ( raw[0] != '/' || raw[1] != '/' ) + break; + + while ( raw[0] && raw[0] != '\n' ) + raw++; } //cout << "RAW\n---\n" << raw << "\n---" << endl; |