seanhalle@6: #include seanhalle@6: seanhalle@6: using namespace v8; seanhalle@6: seanhalle@6: int main(int argc, char* argv[]) { seanhalle@6: // Get the default Isolate created at startup. seanhalle@6: Isolate* isolate = Isolate::GetCurrent(); seanhalle@6: seanhalle@6: // Create a stack-allocated handle scope. seanhalle@6: HandleScope handle_scope(isolate); seanhalle@6: seanhalle@6: // Create a new context. seanhalle@6: Handle context = Context::New(isolate); seanhalle@6: seanhalle@6: // Enter the context for compiling and running the hello world script. seanhalle@6: Context::Scope context_scope(context); seanhalle@6: seanhalle@6: // Create a string containing the JavaScript source code. seanhalle@6: Handle source = String::NewFromUtf8(isolate, "'Hello' + ', World!'"); seanhalle@6: seanhalle@6: // Compile the source code. seanhalle@6: Handle