Spider Monkey Shell: another checkpoint

This commit is contained in:
Eliot Horowitz
2009-05-13 17:27:45 -04:00
parent 18c01987a2
commit 4bf96beb17
5 changed files with 39 additions and 19 deletions

View File

@@ -238,30 +238,27 @@ int main(int argc, char* argv[]) {
break;
}
scope->externalSetup();
/*
if ( !nodb ) { // connect to db
v8::HandleScope handle_scope;
cout << "url: " << url << endl;
string setup = (string)"db = connect( \"" + fixHost( url , dbhost , port ) + "\")";
if ( ! ExecuteString( v8::String::New( setup.c_str() ) , v8::String::New( "(connect)" ) , false , true ) ){
if ( ! scope->exec( setup , "(connect)" , false , true , false ) )
return -1;
}
if ( username.size() && password.size() ){
stringstream ss;
ss << "if ( ! db.auth( \"" << username << "\" , \"" << password << "\" ) ){ throw 'login failed'; }";
if ( ! ExecuteString( v8::String::New( ss.str().c_str() ) , v8::String::New( "(auth)" ) , true , true ) ){
if ( ! scope->exec( ss.str() , "(auth)" , true , true , false ) ){
cout << "login failed" << endl;
return -1;
}
}
}
*/
int numFiles = 0;