Commit a83be518 authored by Dan Elphick's avatar Dan Elphick Committed by Commit Bot

Fix deprecated V8 function use in content_shell

Fixes use of deprecated Object::Set V8 function by instead using the
Context version and checking the return value.

Bug: v8:7283, v8:8562
Change-Id: Ia3ab123d36507576bde1a9dcd79ffbdc545469a4
Reviewed-on: https://chromium-review.googlesource.com/c/1454528
Commit-Queue: Dan Elphick <delphick@chromium.org>
Commit-Queue: Peter Beverloo <peter@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: default avatarPeter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#629162}
parent 1479ac65
......@@ -71,8 +71,10 @@ void AccessibilityControllerBindings::Install(
if (bindings.IsEmpty())
return;
v8::Local<v8::Object> global = context->Global();
global->Set(gin::StringToV8(isolate, "accessibilityController"),
bindings.ToV8());
global
->Set(context, gin::StringToV8(isolate, "accessibilityController"),
bindings.ToV8())
.Check();
}
AccessibilityControllerBindings::AccessibilityControllerBindings(
......
......@@ -702,7 +702,8 @@ void EventSenderBindings::Install(base::WeakPtr<EventSender> sender,
if (bindings.IsEmpty())
return;
v8::Local<v8::Object> global = context->Global();
global->Set(gin::StringToV8(isolate, "eventSender"), bindings.ToV8());
global->Set(context, gin::StringToV8(isolate, "eventSender"), bindings.ToV8())
.Check();
}
gin::ObjectTemplateBuilder EventSenderBindings::GetObjectTemplateBuilder(
......
......@@ -91,7 +91,10 @@ void GamepadControllerBindings::Install(
if (bindings.IsEmpty())
return;
v8::Local<v8::Object> global = context->Global();
global->Set(gin::StringToV8(isolate, "gamepadController"), bindings.ToV8());
global
->Set(context, gin::StringToV8(isolate, "gamepadController"),
bindings.ToV8())
.Check();
}
GamepadControllerBindings::GamepadControllerBindings(
......
......@@ -34,7 +34,10 @@ void GCController::Install(TestInterfaces* interfaces,
if (controller.IsEmpty())
return;
v8::Local<v8::Object> global = context->Global();
global->Set(gin::StringToV8(isolate, "GCController"), controller.ToV8());
global
->Set(context, gin::StringToV8(isolate, "GCController"),
controller.ToV8())
.Check();
}
GCController::GCController(TestInterfaces* interfaces)
......
......@@ -332,7 +332,8 @@ void TestRunnerBindings::Install(
v8::Local<v8::Object> global = context->Global();
v8::Local<v8::Value> v8_bindings = bindings.ToV8();
global->Set(gin::StringToV8(isolate, "testRunner"), v8_bindings);
global->Set(context, gin::StringToV8(isolate, "testRunner"), v8_bindings)
.Check();
// Inject some JavaScript to the top-level frame of a reftest in the
// web-platform-tests suite to have the same reftest screenshot timing as
......
......@@ -85,7 +85,10 @@ void TextInputControllerBindings::Install(
if (bindings.IsEmpty())
return;
v8::Local<v8::Object> global = context->Global();
global->Set(gin::StringToV8(isolate, "textInputController"), bindings.ToV8());
global
->Set(context, gin::StringToV8(isolate, "textInputController"),
bindings.ToV8())
.Check();
}
TextInputControllerBindings::TextInputControllerBindings(
......
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