Commit 8fb933f6 authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[cleanup][v8] Replace uses of deprecated API

R=raymes@chromium.org

Bug: v8:7295 v8:8015
Change-Id: Id9a5334b9e85e6f37200d4a89eb7b80eec444958
Reviewed-on: https://chromium-review.googlesource.com/1238156Reviewed-by: default avatarRaymes Khoury <raymes@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593496}
parent da85afa6
...@@ -211,13 +211,17 @@ v8::Local<v8::Value> MessageChannel::GetNamedProperty( ...@@ -211,13 +211,17 @@ v8::Local<v8::Value> MessageChannel::GetNamedProperty(
PepperTryCatchV8 try_catch(instance_, &var_converter_, isolate); PepperTryCatchV8 try_catch(instance_, &var_converter_, isolate);
if (identifier == kPostMessage) { if (identifier == kPostMessage) {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
return GetFunctionTemplate(isolate, identifier, return GetFunctionTemplate(isolate, identifier,
&MessageChannel::PostMessageToNative) &MessageChannel::PostMessageToNative)
->GetFunction(); ->GetFunction(context)
.ToLocalChecked();
} else if (identifier == kPostMessageAndAwaitResponse) { } else if (identifier == kPostMessageAndAwaitResponse) {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
return GetFunctionTemplate(isolate, identifier, return GetFunctionTemplate(isolate, identifier,
&MessageChannel::PostBlockingMessageToNative) &MessageChannel::PostBlockingMessageToNative)
->GetFunction(); ->GetFunction(context)
.ToLocalChecked();
} }
std::map<std::string, ScopedPPVar>::const_iterator it = std::map<std::string, ScopedPPVar>::const_iterator it =
......
...@@ -239,9 +239,12 @@ v8::Local<v8::Value> PluginObject::GetPropertyOrMethod(v8::Isolate* isolate, ...@@ -239,9 +239,12 @@ v8::Local<v8::Value> PluginObject::GetPropertyOrMethod(v8::Isolate* isolate,
return v8::Local<v8::Value>(); return v8::Local<v8::Value>();
if (has_method) { if (has_method) {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
const std::string& identifier = const std::string& identifier =
StringVar::FromPPVar(identifier_var)->value(); StringVar::FromPPVar(identifier_var)->value();
return GetFunctionTemplate(isolate, identifier)->GetFunction(); return GetFunctionTemplate(isolate, identifier)
->GetFunction(context)
.ToLocalChecked();
} }
return v8::Local<v8::Value>(); return v8::Local<v8::Value>();
......
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