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

Unified Diff: extensions/renderer/script_injection.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/script_context.cc ('k') | extensions/renderer/send_request_natives.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/script_injection.cc
diff --git a/extensions/renderer/script_injection.cc b/extensions/renderer/script_injection.cc
index cb0e8a14689fa2c0fb9c9516819419bd94add69f..a1090e5b2693af2d201a5d609f0e7574cb57ac17 100644
--- a/extensions/renderer/script_injection.cc
+++ b/extensions/renderer/script_injection.cc
@@ -352,15 +352,14 @@ void ScriptInjection::OnJsInjectionCompleted(
if (expects_results) {
if (!results.empty() && !results[0].IsEmpty()) {
// Right now, we only support returning single results (per frame).
- std::unique_ptr<content::V8ValueConverter> v8_converter(
- content::V8ValueConverter::create());
// It's safe to always use the main world context when converting
// here. V8ValueConverterImpl shouldn't actually care about the
// context scope, and it switches to v8::Object's creation context
// when encountered.
v8::Local<v8::Context> context =
render_frame_->GetWebFrame()->MainWorldScriptContext();
- execution_result_ = v8_converter->FromV8Value(results[0], context);
+ execution_result_ =
+ content::V8ValueConverter::Create()->FromV8Value(results[0], context);
}
if (!execution_result_.get())
execution_result_ = base::MakeUnique<base::Value>();
« no previous file with comments | « extensions/renderer/script_context.cc ('k') | extensions/renderer/send_request_natives.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698