| Index: samples/hello-world.cc
|
| diff --git a/samples/hello-world.cc b/samples/hello-world.cc
|
| index c38c76022cd67ece2c2937bcf938a1a5a3f20441..8be5a31fca4a748eaa7d82010ad79bdf17d8e2a6 100644
|
| --- a/samples/hello-world.cc
|
| +++ b/samples/hello-world.cc
|
| @@ -47,13 +47,15 @@ int main(int argc, char* argv[]) {
|
| Context::Scope context_scope(context);
|
|
|
| // Create a string containing the JavaScript source code.
|
| - Local<String> source = String::NewFromUtf8(isolate, "'Hello' + ', World!'");
|
| + Local<String> source =
|
| + String::NewFromUtf8(isolate, "'Hello' + ', World!'",
|
| + NewStringType::kNormal).ToLocalChecked();
|
|
|
| // Compile the source code.
|
| - Local<Script> script = Script::Compile(source);
|
| + Local<Script> script = Script::Compile(context, source).ToLocalChecked();
|
|
|
| // Run the script to get the result.
|
| - Local<Value> result = script->Run();
|
| + Local<Value> result = script->Run(context).ToLocalChecked();
|
|
|
| // Convert the result to an UTF8 string and print it.
|
| String::Utf8Value utf8(result);
|
|
|