# HG changeset patch # User Sara # Date 1392492447 28800 # Node ID 1e2d1d978e4a41b4f5a6d7460c9f1b7fb0367823 # Parent 524090d5a407473eead0700917ad73d624314672 This is the whole folder of 2nd test diff -r 524090d5a407 -r 1e2d1d978e4a V8_tests/Passing_Context_and_compiledScript_to_threads/OneContextAfterAnotherTest.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/V8_tests/Passing_Context_and_compiledScript_to_threads/OneContextAfterAnotherTest.cpp Sat Feb 15 11:27:27 2014 -0800 @@ -0,0 +1,48 @@ +#include +#include +using namespace v8; +Isolate* isolate; +int main(int argc, char* argv[]) { + isolate = Isolate::New(); + { + if(isolate == NULL){ + printf("Error"); + return 0; + } + Locker locker(isolate); + Isolate::Scope isolate_scope(isolate); + // Create a stack-allocated handle scope. + HandleScope handle_scope(isolate); + // Create a new context. + Handle context1 = Context::New(isolate); + // Enter the context for compiling and running the hello world script. + Context::Scope context_scope1(context1); + { + // Create a string containing the JavaScript source code + Handle source1 = String::NewFromUtf8(isolate, "'Hello' + ', World!'"); + // Compile the source code. + Handle