Commit ebadb68f authored by jochen's avatar jochen Committed by Commit bot

Remove usage of to-be-deprecated APIs from samples

BUG=v8:4134
R=vogelheim@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/1219133004

Cr-Commit-Position: refs/heads/master@{#29452}
parent 0ecd9e1b
......@@ -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);
......
This diff is collapsed.
......@@ -40,6 +40,10 @@
'include_dirs': [
'..',
],
'defines': [
# TODO(jochen): Remove again after this is globally turned on.
'V8_IMMINENT_DEPRECATION_WARNINGS',
],
'conditions': [
['v8_enable_i18n_support==1', {
'dependencies': [
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment