}
// Create a string containing the JavaScript source code.
#if defined(V8_MAJOR_VERSION) && V8_MAJOR_VERSION >=5
- ScriptCompiler::Source *source = new ScriptCompiler::Source(String::NewFromUtf8(isolate, script_data));
+ ScriptCompiler::Source source(String::NewFromUtf8(isolate, script_data));
#else
Handle<String> source = String::NewFromUtf8(isolate, script_data);
#endif
// Compile the source code.
#if defined(V8_MAJOR_VERSION) && V8_MAJOR_VERSION >=5
v8::ScriptCompiler::CompileOptions options = v8::ScriptCompiler::kNoCompileOptions;
- Handle<v8::Script> v8_script = v8::ScriptCompiler::Compile(context, source, options).ToLocalChecked();
+ Handle<v8::Script> v8_script = v8::ScriptCompiler::Compile(context, &source, options).ToLocalChecked();
//Handle<v8::Script> v8_script = v8::ScriptCompiler::Compile(context, source,/* String::NewFromUtf8(isolate, script_file),*/ v8::ScriptCompiler::kProduceCodeCache).ToLocalChecked();
//source->GetCachedData();
#else