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