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

Unified Diff: extensions/renderer/argument_spec.cc

Issue 2847853002: [Extensions Bindings] Add errors to signature parsing (Closed)
Patch Set: Rebase Created 3 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 | « extensions/renderer/api_signature_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/argument_spec.cc
diff --git a/extensions/renderer/argument_spec.cc b/extensions/renderer/argument_spec.cc
index 08768595b80ddb9dbb27efc8bf4eaa1b42138af0..f56af3f8fce86addaf14ebdd2259dd157f0d79ee 100644
--- a/extensions/renderer/argument_spec.cc
+++ b/extensions/renderer/argument_spec.cc
@@ -420,8 +420,10 @@ bool ArgumentSpec::ParseArgumentToObject(
// HasOwnProperty() check here in the future, if we desire.
// See also comment in ParseArgumentToArray() about passing in custom
// crazy values here.
- if (!object->Get(context, key).ToLocal(&prop_value))
+ if (!object->Get(context, key).ToLocal(&prop_value)) {
+ *error = api_errors::ScriptThrewError();
return false;
+ }
// Note: We don't serialize undefined or null values.
// TODO(devlin): This matches current behavior, but it is correct?
« no previous file with comments | « extensions/renderer/api_signature_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698