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

Unified Diff: extensions/renderer/script_context.cc

Issue 2931393003: [Content] Update V8ValueConverter::create to return a std::unique_ptr (Closed)
Patch Set: rebase 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
« no previous file with comments | « extensions/renderer/runtime_custom_bindings.cc ('k') | extensions/renderer/script_injection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/script_context.cc
diff --git a/extensions/renderer/script_context.cc b/extensions/renderer/script_context.cc
index 256381e1b839e2f5348e0c676f8efad11303481a..13c4bdf6c57d5fe02906ebf998a3dd0cf3b57089 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 {
@@ -372,13 +370,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())};
module_system()->CallModuleMethodSafe("sendRequest", "handleResponse",
« no previous file with comments | « extensions/renderer/runtime_custom_bindings.cc ('k') | extensions/renderer/script_injection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698