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

Unified Diff: chrome/renderer/extensions/event_bindings.cc

Issue 10890002: Make V8ValueConverter.FromV8Value behave similarly to JSON.stringify (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: no more function Created 8 years, 3 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 | chrome/renderer/extensions/send_request_natives.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/event_bindings.cc
diff --git a/chrome/renderer/extensions/event_bindings.cc b/chrome/renderer/extensions/event_bindings.cc
index 329a70bb8cda4fc3769dda4bcd645841125c3f9e..94258dbeca6d2cab08180df321a0cafa79bd0cdd 100644
--- a/chrome/renderer/extensions/event_bindings.cc
+++ b/chrome/renderer/extensions/event_bindings.cc
@@ -191,6 +191,8 @@ class ExtensionImpl : public ChromeV8Extension {
base::DictionaryValue* filter_dict = NULL;
base::Value* filter_value = converter->FromV8Value(args[1]->ToObject(),
v8::Context::GetCurrent());
+ if (!filter_value)
+ return v8::Integer::New(-1);
if (!filter_value->GetAsDictionary(&filter_dict)) {
delete filter_value;
return v8::Integer::New(-1);
« no previous file with comments | « no previous file | chrome/renderer/extensions/send_request_natives.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698