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

Unified Diff: extensions/renderer/script_injection.cc

Issue 1066563002: [Extensions] Don't pass empty value to V8Converter in OnJSInjectionCompleted (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | no next file » | 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 0a440f9ce8367023344adc42818c75854839501d..5165ed1bbd7acec0150afca005261257b14ac37b 100644
--- a/extensions/renderer/script_injection.cc
+++ b/extensions/renderer/script_injection.cc
@@ -305,7 +305,7 @@ void ScriptInjection::OnJsInjectionCompleted(
bool expects_results = injector_->ExpectsResults();
if (expects_results) {
scoped_ptr<base::Value> result;
- if (!results.isEmpty()) {
+ if (!results.isEmpty() && !results[0].IsEmpty()) {
// Right now, we only support returning single results (per frame).
scoped_ptr<content::V8ValueConverter> v8_converter(
content::V8ValueConverter::create());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698