Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: extensions/renderer/script_context.cc

Issue 2931393003: [Content] Update V8ValueConverter::create to return a std::unique_ptr (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/renderer/script_context.cc
diff --git a/extensions/renderer/script_context.cc b/extensions/renderer/script_context.cc
index 3dc2454a7115e5be0566d0fe736efd22f3304b68..636278868993603d0b63c3c4af727018fa50edf8 100644
--- a/extensions/renderer/script_context.cc
+++ b/extensions/renderer/script_context.cc
@@ -33,8 +33,6 @@
#include "third_party/WebKit/public/web/WebView.h"
#include "v8/include/v8.h"
-using content::V8ValueConverter;
-
namespace extensions {
namespace {
@@ -370,13 +368,12 @@ void ScriptContext::OnResponseReceived(const std::string& name,
DCHECK(thread_checker_.CalledOnValidThread());
v8::HandleScope handle_scope(isolate());
- std::unique_ptr<V8ValueConverter> converter(V8ValueConverter::create());
v8::Local<v8::Value> argv[] = {
v8::Integer::New(isolate(), request_id),
v8::String::NewFromUtf8(isolate(), name.c_str()),
v8::Boolean::New(isolate(), success),
- converter->ToV8Value(&response,
- v8::Local<v8::Context>::New(isolate(), v8_context_)),
+ content::V8ValueConverter::Create()->ToV8Value(
+ &response, v8::Local<v8::Context>::New(isolate(), v8_context_)),
v8::String::NewFromUtf8(isolate(), error.c_str())};
v8::Local<v8::Value> retval = module_system()->CallModuleMethod(

Powered by Google App Engine
This is Rietveld 408576698