Commit e228478b authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[cleanup][v8] Replace uses of deprecated API

Bug: v8:7295 v8:8015
Change-Id: I0b6a6c6348d446b318329db9a91ac1a148eee7ca
Reviewed-on: https://chromium-review.googlesource.com/1238176Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593985}
parent 9c838a92
......@@ -54,10 +54,12 @@ void DistillerNativeJavaScript::BindFunctionToObject(
v8::Local<v8::Object> javascript_object,
const std::string& name,
const base::Callback<Sig> callback) {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
// Get the isolate associated with this object.
javascript_object->Set(
gin::StringToSymbol(isolate, name),
gin::CreateFunctionTemplate(isolate, callback)->GetFunction());
javascript_object->Set(gin::StringToSymbol(isolate, name),
gin::CreateFunctionTemplate(isolate, callback)
->GetFunction(context)
.ToLocalChecked());
}
void DistillerNativeJavaScript::EnsureServiceConnected() {
......
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