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

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

Issue 10736024: Revert 146038 as it might have broken chromeos browser_tests - Make eventArgumentMassagers asynchro… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | « chrome/common/extensions/api/input_ime.json ('k') | chrome/renderer/extensions/event_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/chrome_v8_context_set.cc
===================================================================
--- chrome/renderer/extensions/chrome_v8_context_set.cc (revision 146077)
+++ chrome/renderer/extensions/chrome_v8_context_set.cc (working copy)
@@ -145,5 +145,15 @@
v8::Handle<v8::Value> retval;
(*it)->CallChromeHiddenMethod(
method_name, v8_arguments.size(), &v8_arguments[0], &retval);
+ // In debug, the js will validate the event parameters and return a
+ // string if a validation error has occured.
+ // TODO(rafaelw): Consider only doing this check if function_name ==
+ // "Event.dispatchJSON".
+#ifndef NDEBUG
+ if (!retval.IsEmpty() && !retval->IsUndefined()) {
+ std::string error = *v8::String::AsciiValue(retval);
+ DCHECK(false) << error;
+ }
+#endif
}
}
« no previous file with comments | « chrome/common/extensions/api/input_ime.json ('k') | chrome/renderer/extensions/event_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698