| Index: content/renderer/gpu/gpu_benchmarking_extension.cc
|
| diff --git a/content/renderer/gpu/gpu_benchmarking_extension.cc b/content/renderer/gpu/gpu_benchmarking_extension.cc
|
| index c1b2c31ff10a625014298a721839287158029ff0..f15bd60e3a39e08f726c688563cbd7567e5ab537 100644
|
| --- a/content/renderer/gpu/gpu_benchmarking_extension.cc
|
| +++ b/content/renderer/gpu/gpu_benchmarking_extension.cc
|
| @@ -311,9 +311,8 @@ void OnMicroBenchmarkCompleted(CallbackAndContext* callback_and_context,
|
| v8::Context::Scope context_scope(context);
|
| WebLocalFrame* frame = WebLocalFrame::FrameForContext(context);
|
| if (frame) {
|
| - std::unique_ptr<V8ValueConverter> converter =
|
| - base::WrapUnique(V8ValueConverter::create());
|
| - v8::Local<v8::Value> value = converter->ToV8Value(result.get(), context);
|
| + v8::Local<v8::Value> value =
|
| + V8ValueConverter::Create()->ToV8Value(result.get(), context);
|
| v8::Local<v8::Value> argv[] = { value };
|
|
|
| frame->CallFunctionEvenIfScriptDisabled(callback_and_context->GetCallback(),
|
| @@ -1025,11 +1024,10 @@ bool GpuBenchmarking::PointerActionSequence(gin::Arguments* args) {
|
| return false;
|
| }
|
|
|
| - std::unique_ptr<V8ValueConverter> converter =
|
| - base::WrapUnique(V8ValueConverter::create());
|
| v8::Local<v8::Context> v8_context =
|
| context.web_frame()->MainWorldScriptContext();
|
| - std::unique_ptr<base::Value> value = converter->FromV8Value(obj, v8_context);
|
| + std::unique_ptr<base::Value> value =
|
| + V8ValueConverter::Create()->FromV8Value(obj, v8_context);
|
|
|
| // Get all the pointer actions from the user input and wrap them into a
|
| // SyntheticPointerActionListParams object.
|
| @@ -1081,11 +1079,9 @@ int GpuBenchmarking::RunMicroBenchmark(gin::Arguments* args) {
|
| new CallbackAndContext(args->isolate(), callback,
|
| context.web_frame()->MainWorldScriptContext());
|
|
|
| - std::unique_ptr<V8ValueConverter> converter =
|
| - base::WrapUnique(V8ValueConverter::create());
|
| v8::Local<v8::Context> v8_context = callback_and_context->GetContext();
|
| std::unique_ptr<base::Value> value =
|
| - converter->FromV8Value(arguments, v8_context);
|
| + V8ValueConverter::Create()->FromV8Value(arguments, v8_context);
|
|
|
| return context.compositor()->ScheduleMicroBenchmark(
|
| name, std::move(value),
|
| @@ -1100,12 +1096,10 @@ bool GpuBenchmarking::SendMessageToMicroBenchmark(
|
| if (!context.Init(true))
|
| return false;
|
|
|
| - std::unique_ptr<V8ValueConverter> converter =
|
| - base::WrapUnique(V8ValueConverter::create());
|
| v8::Local<v8::Context> v8_context =
|
| context.web_frame()->MainWorldScriptContext();
|
| std::unique_ptr<base::Value> value =
|
| - converter->FromV8Value(message, v8_context);
|
| + V8ValueConverter::Create()->FromV8Value(message, v8_context);
|
|
|
| return context.compositor()->SendMessageToMicroBenchmark(id,
|
| std::move(value));
|
|
|