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

Unified Diff: extensions/renderer/bindings/argument_spec.cc

Issue 2949143002: [Extensions Bindings] Support ArrayBufferView in idl files (Closed)
Patch Set: extend comment 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/bindings/api_bindings_system.cc ('k') | extensions/renderer/v8_schema_registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/bindings/argument_spec.cc
diff --git a/extensions/renderer/bindings/argument_spec.cc b/extensions/renderer/bindings/argument_spec.cc
index cd105bff336f5b4285611f25b0bf4edec412c4d1..3f8a0867dea4c562633a7462690bb7a80d67abde 100644
--- a/extensions/renderer/bindings/argument_spec.cc
+++ b/extensions/renderer/bindings/argument_spec.cc
@@ -166,10 +166,6 @@ void ArgumentSpec::InitializeType(const base::DictionaryValue* dict) {
// Additional properties are always optional.
additional_properties_->optional_ = true;
}
- std::string instance_of;
- if (dict->GetString("isInstanceOf", &instance_of)) {
- instance_of_ = instance_of;
- }
} else if (type_ == ArgumentType::LIST) {
const base::DictionaryValue* item_value = nullptr;
CHECK(dict->GetDictionary("items", &item_value));
@@ -201,6 +197,12 @@ void ArgumentSpec::InitializeType(const base::DictionaryValue* dict) {
// API), but it could potentially make sense for lists or functions as well.
if (type_ == ArgumentType::OBJECT || type_ == ArgumentType::ANY)
dict->GetBoolean("preserveNull", &preserve_null_);
+
+ if (type_ == ArgumentType::OBJECT || type_ == ArgumentType::BINARY) {
+ std::string instance_of;
+ if (dict->GetString("isInstanceOf", &instance_of))
+ instance_of_ = instance_of;
+ }
}
ArgumentSpec::~ArgumentSpec() {}
« no previous file with comments | « extensions/renderer/bindings/api_bindings_system.cc ('k') | extensions/renderer/v8_schema_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698