Commit 4d3935bc authored by Adam Langley's avatar Adam Langley Committed by Commit Bot

Support hyphens in dictionary identifiers.

WebIDL allows hyphens in identifiers[1], specifically in dictionary
keys. Currently the generated bindings end up emitting the hyphen in C++
which fails to compile.

One option would be to use the ImplementedBy name more uniformly: at the
moment it's used in a couple of places, but generally not for methods
that have strings appended or prepended (like "get" or "set"). That could
be changed at the cost of tweaking a bunch of existing usages.

Instead, this change doesn't touch existing code, but tweaks the
generation so that hyphens in WebIDL identifiers are lowerCamelCased.

This is all motivated because WebAuthn defines a dictionary of
extensions[2] and FIDO has defined an extension with a hyphen in the
name[3].

[1] https://heycam.github.io/webidl/#prod-identifier
[2] https://www.w3.org/TR/webauthn/#iface-authentication-extensions-client-inputs
[3] https://fidoalliance.org/specs/fido-v2.0-rd-20180702/fido-client-to-authenticator-protocol-v2.0-rd-20180702.html#sctn-hmac-secret-extension

Change-Id: Id17c528c5594251385a0a10fa5e91988908b88b6
Reviewed-on: https://chromium-review.googlesource.com/c/1247233
Commit-Queue: Adam Langley <agl@chromium.org>
Reviewed-by: default avatarHitoshi Yoshida <peria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597296}
parent 9fae0279
...@@ -462,8 +462,6 @@ def shorten_union_name(union_type): ...@@ -462,8 +462,6 @@ def shorten_union_name(union_type):
def to_snake_case(name): def to_snake_case(name):
if name.lower() == name:
return name
return NameStyleConverter(name).to_snake_case() return NameStyleConverter(name).to_snake_case()
......
...@@ -35,6 +35,7 @@ import os ...@@ -35,6 +35,7 @@ import os
import re import re
import sys import sys
from blinkbuild.name_style_converter import NameStyleConverter
from idl_types import IdlTypeBase from idl_types import IdlTypeBase
import idl_types import idl_types
from idl_definitions import Exposure, IdlInterface, IdlAttribute from idl_definitions import Exposure, IdlInterface, IdlAttribute
...@@ -366,6 +367,12 @@ def cpp_name(definition_or_member): ...@@ -366,6 +367,12 @@ def cpp_name(definition_or_member):
extended_attributes = definition_or_member.extended_attributes extended_attributes = definition_or_member.extended_attributes
if extended_attributes and 'ImplementedAs' in extended_attributes: if extended_attributes and 'ImplementedAs' in extended_attributes:
return extended_attributes['ImplementedAs'] return extended_attributes['ImplementedAs']
# WebIDL identifiers can contain hyphens[1], but C++ identifiers cannot.
# Therefore camelCase hyphen-containing identifiers.
#
# [1] https://heycam.github.io/webidl/#prod-identifier
if '-' in definition_or_member.name:
return NameStyleConverter(definition_or_member.name).to_lower_camel_case()
return definition_or_member.name return definition_or_member.name
......
...@@ -63,4 +63,5 @@ dictionary TestDictionary { ...@@ -63,4 +63,5 @@ dictionary TestDictionary {
record<DOMString, (double or DOMString)?> unionOrNullRecordMember; record<DOMString, (double or DOMString)?> unionOrNullRecordMember;
VoidCallbackFunction callbackFunctionMember; VoidCallbackFunction callbackFunctionMember;
required VoidCallbackFunction requiredCallbackFunctionMember; required VoidCallbackFunction requiredCallbackFunctionMember;
boolean member-with-hyphen-in-name = false;
}; };
...@@ -22,6 +22,7 @@ TestDictionary::TestDictionary() { ...@@ -22,6 +22,7 @@ TestDictionary::TestDictionary() {
setDoubleOrStringMember(DoubleOrString::FromDouble(3.14)); setDoubleOrStringMember(DoubleOrString::FromDouble(3.14));
setEnumMember("foo"); setEnumMember("foo");
setLongMember(1); setLongMember(1);
setMemberWithHyphenInName(false);
setOtherDoubleOrStringMember(DoubleOrString::FromString("default string value")); setOtherDoubleOrStringMember(DoubleOrString::FromString("default string value"));
setRestrictedDoubleMember(3.14); setRestrictedDoubleMember(3.14);
setStringOrNullMember("default string value"); setStringOrNullMember("default string value");
......
...@@ -222,6 +222,13 @@ class CORE_EXPORT TestDictionary : public IDLDictionaryBase { ...@@ -222,6 +222,13 @@ class CORE_EXPORT TestDictionary : public IDLDictionaryBase {
} }
inline void setLongMember(int32_t); inline void setLongMember(int32_t);
bool hasMemberWithHyphenInName() const { return has_member_with_hyphen_in_name_; }
bool memberWithHyphenInName() const {
DCHECK(has_member_with_hyphen_in_name_);
return member_with_hyphen_in_name_;
}
inline void setMemberWithHyphenInName(bool);
bool hasObjectMember() const { return !(object_member_.IsEmpty() || object_member_.IsNull() || object_member_.IsUndefined()); } bool hasObjectMember() const { return !(object_member_.IsEmpty() || object_member_.IsNull() || object_member_.IsUndefined()); }
ScriptValue objectMember() const { ScriptValue objectMember() const {
return object_member_; return object_member_;
...@@ -454,6 +461,7 @@ class CORE_EXPORT TestDictionary : public IDLDictionaryBase { ...@@ -454,6 +461,7 @@ class CORE_EXPORT TestDictionary : public IDLDictionaryBase {
bool has_internal_dictionary_sequence_member_ = false; bool has_internal_dictionary_sequence_member_ = false;
bool has_is_public_ = false; bool has_is_public_ = false;
bool has_long_member_ = false; bool has_long_member_ = false;
bool has_member_with_hyphen_in_name_ = false;
bool has_origin_trial_member_ = false; bool has_origin_trial_member_ = false;
bool has_origin_trial_second_member_ = false; bool has_origin_trial_second_member_ = false;
bool has_record_member_ = false; bool has_record_member_ = false;
...@@ -498,6 +506,7 @@ class CORE_EXPORT TestDictionary : public IDLDictionaryBase { ...@@ -498,6 +506,7 @@ class CORE_EXPORT TestDictionary : public IDLDictionaryBase {
HeapVector<InternalDictionary> internal_dictionary_sequence_member_; HeapVector<InternalDictionary> internal_dictionary_sequence_member_;
bool is_public_; bool is_public_;
int32_t long_member_; int32_t long_member_;
bool member_with_hyphen_in_name_;
ScriptValue object_member_; ScriptValue object_member_;
ScriptValue object_or_null_member_; ScriptValue object_or_null_member_;
bool origin_trial_member_; bool origin_trial_member_;
...@@ -602,6 +611,11 @@ void TestDictionary::setLongMember(int32_t value) { ...@@ -602,6 +611,11 @@ void TestDictionary::setLongMember(int32_t value) {
has_long_member_ = true; has_long_member_ = true;
} }
void TestDictionary::setMemberWithHyphenInName(bool value) {
member_with_hyphen_in_name_ = value;
has_member_with_hyphen_in_name_ = true;
}
void TestDictionary::setOriginTrialMember(bool value) { void TestDictionary::setOriginTrialMember(bool value) {
origin_trial_member_ = value; origin_trial_member_ = value;
has_origin_trial_member_ = true; has_origin_trial_member_ = true;
......
...@@ -61,6 +61,7 @@ static const v8::Eternal<v8::Name>* eternalV8TestDictionaryKeys(v8::Isolate* iso ...@@ -61,6 +61,7 @@ static const v8::Eternal<v8::Name>* eternalV8TestDictionaryKeys(v8::Isolate* iso
"garbageCollectedRecordMember", "garbageCollectedRecordMember",
"internalDictionarySequenceMember", "internalDictionarySequenceMember",
"longMember", "longMember",
"member-with-hyphen-in-name",
"objectMember", "objectMember",
"objectOrNullMember", "objectOrNullMember",
"originTrialMember", "originTrialMember",
...@@ -516,8 +517,22 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -516,8 +517,22 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
impl.setLongMember(long_member_cpp_value); impl.setLongMember(long_member_cpp_value);
} }
v8::Local<v8::Value> member_with_hyphen_in_name_value;
if (!v8Object->Get(context, keys[26].Get(isolate)).ToLocal(&member_with_hyphen_in_name_value)) {
exceptionState.RethrowV8Exception(block.Exception());
return;
}
if (member_with_hyphen_in_name_value.IsEmpty() || member_with_hyphen_in_name_value->IsUndefined()) {
// Do nothing.
} else {
bool member_with_hyphen_in_name_cpp_value = NativeValueTraits<IDLBoolean>::NativeValue(isolate, member_with_hyphen_in_name_value, exceptionState);
if (exceptionState.HadException())
return;
impl.setMemberWithHyphenInName(member_with_hyphen_in_name_cpp_value);
}
v8::Local<v8::Value> object_member_value; v8::Local<v8::Value> object_member_value;
if (!v8Object->Get(context, keys[26].Get(isolate)).ToLocal(&object_member_value)) { if (!v8Object->Get(context, keys[27].Get(isolate)).ToLocal(&object_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -533,7 +548,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -533,7 +548,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> object_or_null_member_value; v8::Local<v8::Value> object_or_null_member_value;
if (!v8Object->Get(context, keys[27].Get(isolate)).ToLocal(&object_or_null_member_value)) { if (!v8Object->Get(context, keys[28].Get(isolate)).ToLocal(&object_or_null_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -551,7 +566,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -551,7 +566,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> other_double_or_string_member_value; v8::Local<v8::Value> other_double_or_string_member_value;
if (!v8Object->Get(context, keys[30].Get(isolate)).ToLocal(&other_double_or_string_member_value)) { if (!v8Object->Get(context, keys[31].Get(isolate)).ToLocal(&other_double_or_string_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -566,7 +581,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -566,7 +581,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> public_value; v8::Local<v8::Value> public_value;
if (!v8Object->Get(context, keys[31].Get(isolate)).ToLocal(&public_value)) { if (!v8Object->Get(context, keys[32].Get(isolate)).ToLocal(&public_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -580,7 +595,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -580,7 +595,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> record_member_value; v8::Local<v8::Value> record_member_value;
if (!v8Object->Get(context, keys[32].Get(isolate)).ToLocal(&record_member_value)) { if (!v8Object->Get(context, keys[33].Get(isolate)).ToLocal(&record_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -594,7 +609,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -594,7 +609,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> required_callback_function_member_value; v8::Local<v8::Value> required_callback_function_member_value;
if (!v8Object->Get(context, keys[33].Get(isolate)).ToLocal(&required_callback_function_member_value)) { if (!v8Object->Get(context, keys[34].Get(isolate)).ToLocal(&required_callback_function_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -607,7 +622,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -607,7 +622,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> restricted_double_member_value; v8::Local<v8::Value> restricted_double_member_value;
if (!v8Object->Get(context, keys[34].Get(isolate)).ToLocal(&restricted_double_member_value)) { if (!v8Object->Get(context, keys[35].Get(isolate)).ToLocal(&restricted_double_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -621,7 +636,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -621,7 +636,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> string_member_value; v8::Local<v8::Value> string_member_value;
if (!v8Object->Get(context, keys[37].Get(isolate)).ToLocal(&string_member_value)) { if (!v8Object->Get(context, keys[38].Get(isolate)).ToLocal(&string_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -635,7 +650,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -635,7 +650,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> string_or_null_member_value; v8::Local<v8::Value> string_or_null_member_value;
if (!v8Object->Get(context, keys[38].Get(isolate)).ToLocal(&string_or_null_member_value)) { if (!v8Object->Get(context, keys[39].Get(isolate)).ToLocal(&string_or_null_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -649,7 +664,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -649,7 +664,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> string_or_null_record_member_value; v8::Local<v8::Value> string_or_null_record_member_value;
if (!v8Object->Get(context, keys[39].Get(isolate)).ToLocal(&string_or_null_record_member_value)) { if (!v8Object->Get(context, keys[40].Get(isolate)).ToLocal(&string_or_null_record_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -663,7 +678,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -663,7 +678,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> string_or_null_sequence_member_value; v8::Local<v8::Value> string_or_null_sequence_member_value;
if (!v8Object->Get(context, keys[40].Get(isolate)).ToLocal(&string_or_null_sequence_member_value)) { if (!v8Object->Get(context, keys[41].Get(isolate)).ToLocal(&string_or_null_sequence_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -677,7 +692,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -677,7 +692,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> string_sequence_member_value; v8::Local<v8::Value> string_sequence_member_value;
if (!v8Object->Get(context, keys[41].Get(isolate)).ToLocal(&string_sequence_member_value)) { if (!v8Object->Get(context, keys[42].Get(isolate)).ToLocal(&string_sequence_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -691,7 +706,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -691,7 +706,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> test_enum_or_null_or_test_enum_sequence_member_value; v8::Local<v8::Value> test_enum_or_null_or_test_enum_sequence_member_value;
if (!v8Object->Get(context, keys[42].Get(isolate)).ToLocal(&test_enum_or_null_or_test_enum_sequence_member_value)) { if (!v8Object->Get(context, keys[43].Get(isolate)).ToLocal(&test_enum_or_null_or_test_enum_sequence_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -706,7 +721,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -706,7 +721,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> test_enum_or_test_enum_or_null_sequence_member_value; v8::Local<v8::Value> test_enum_or_test_enum_or_null_sequence_member_value;
if (!v8Object->Get(context, keys[43].Get(isolate)).ToLocal(&test_enum_or_test_enum_or_null_sequence_member_value)) { if (!v8Object->Get(context, keys[44].Get(isolate)).ToLocal(&test_enum_or_test_enum_or_null_sequence_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -721,7 +736,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -721,7 +736,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> test_enum_or_test_enum_sequence_member_value; v8::Local<v8::Value> test_enum_or_test_enum_sequence_member_value;
if (!v8Object->Get(context, keys[44].Get(isolate)).ToLocal(&test_enum_or_test_enum_sequence_member_value)) { if (!v8Object->Get(context, keys[45].Get(isolate)).ToLocal(&test_enum_or_test_enum_sequence_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -736,7 +751,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -736,7 +751,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> test_interface_2_or_uint8_array_member_value; v8::Local<v8::Value> test_interface_2_or_uint8_array_member_value;
if (!v8Object->Get(context, keys[45].Get(isolate)).ToLocal(&test_interface_2_or_uint8_array_member_value)) { if (!v8Object->Get(context, keys[46].Get(isolate)).ToLocal(&test_interface_2_or_uint8_array_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -751,7 +766,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -751,7 +766,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> test_interface_member_value; v8::Local<v8::Value> test_interface_member_value;
if (!v8Object->Get(context, keys[46].Get(isolate)).ToLocal(&test_interface_member_value)) { if (!v8Object->Get(context, keys[47].Get(isolate)).ToLocal(&test_interface_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -767,7 +782,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -767,7 +782,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> test_interface_or_null_member_value; v8::Local<v8::Value> test_interface_or_null_member_value;
if (!v8Object->Get(context, keys[47].Get(isolate)).ToLocal(&test_interface_or_null_member_value)) { if (!v8Object->Get(context, keys[48].Get(isolate)).ToLocal(&test_interface_or_null_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -785,7 +800,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -785,7 +800,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> test_interface_sequence_member_value; v8::Local<v8::Value> test_interface_sequence_member_value;
if (!v8Object->Get(context, keys[48].Get(isolate)).ToLocal(&test_interface_sequence_member_value)) { if (!v8Object->Get(context, keys[49].Get(isolate)).ToLocal(&test_interface_sequence_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -799,7 +814,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -799,7 +814,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> test_object_sequence_member_value; v8::Local<v8::Value> test_object_sequence_member_value;
if (!v8Object->Get(context, keys[49].Get(isolate)).ToLocal(&test_object_sequence_member_value)) { if (!v8Object->Get(context, keys[50].Get(isolate)).ToLocal(&test_object_sequence_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -813,7 +828,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -813,7 +828,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> treat_null_as_string_sequence_member_value; v8::Local<v8::Value> treat_null_as_string_sequence_member_value;
if (!v8Object->Get(context, keys[50].Get(isolate)).ToLocal(&treat_null_as_string_sequence_member_value)) { if (!v8Object->Get(context, keys[51].Get(isolate)).ToLocal(&treat_null_as_string_sequence_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -827,7 +842,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -827,7 +842,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> uint8_array_member_value; v8::Local<v8::Value> uint8_array_member_value;
if (!v8Object->Get(context, keys[51].Get(isolate)).ToLocal(&uint8_array_member_value)) { if (!v8Object->Get(context, keys[52].Get(isolate)).ToLocal(&uint8_array_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -845,7 +860,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -845,7 +860,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> union_in_record_member_value; v8::Local<v8::Value> union_in_record_member_value;
if (!v8Object->Get(context, keys[52].Get(isolate)).ToLocal(&union_in_record_member_value)) { if (!v8Object->Get(context, keys[53].Get(isolate)).ToLocal(&union_in_record_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -859,7 +874,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -859,7 +874,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> union_member_with_sequence_default_value; v8::Local<v8::Value> union_member_with_sequence_default_value;
if (!v8Object->Get(context, keys[53].Get(isolate)).ToLocal(&union_member_with_sequence_default_value)) { if (!v8Object->Get(context, keys[54].Get(isolate)).ToLocal(&union_member_with_sequence_default_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -874,7 +889,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -874,7 +889,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> union_or_null_record_member_value; v8::Local<v8::Value> union_or_null_record_member_value;
if (!v8Object->Get(context, keys[54].Get(isolate)).ToLocal(&union_or_null_record_member_value)) { if (!v8Object->Get(context, keys[55].Get(isolate)).ToLocal(&union_or_null_record_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -888,7 +903,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -888,7 +903,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> union_or_null_sequence_member_value; v8::Local<v8::Value> union_or_null_sequence_member_value;
if (!v8Object->Get(context, keys[55].Get(isolate)).ToLocal(&union_or_null_sequence_member_value)) { if (!v8Object->Get(context, keys[56].Get(isolate)).ToLocal(&union_or_null_sequence_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -902,7 +917,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -902,7 +917,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> union_with_typedefs_value; v8::Local<v8::Value> union_with_typedefs_value;
if (!v8Object->Get(context, keys[56].Get(isolate)).ToLocal(&union_with_typedefs_value)) { if (!v8Object->Get(context, keys[57].Get(isolate)).ToLocal(&union_with_typedefs_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -917,7 +932,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -917,7 +932,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> unrestricted_double_member_value; v8::Local<v8::Value> unrestricted_double_member_value;
if (!v8Object->Get(context, keys[57].Get(isolate)).ToLocal(&unrestricted_double_member_value)) { if (!v8Object->Get(context, keys[58].Get(isolate)).ToLocal(&unrestricted_double_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -931,7 +946,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -931,7 +946,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> usv_string_or_null_member_value; v8::Local<v8::Value> usv_string_or_null_member_value;
if (!v8Object->Get(context, keys[58].Get(isolate)).ToLocal(&usv_string_or_null_member_value)) { if (!v8Object->Get(context, keys[59].Get(isolate)).ToLocal(&usv_string_or_null_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -946,7 +961,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -946,7 +961,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
if (RuntimeEnabledFeatures::RuntimeFeatureEnabled()) { if (RuntimeEnabledFeatures::RuntimeFeatureEnabled()) {
v8::Local<v8::Value> runtime_member_value; v8::Local<v8::Value> runtime_member_value;
if (!v8Object->Get(context, keys[35].Get(isolate)).ToLocal(&runtime_member_value)) { if (!v8Object->Get(context, keys[36].Get(isolate)).ToLocal(&runtime_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -960,7 +975,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -960,7 +975,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
} }
v8::Local<v8::Value> runtime_second_member_value; v8::Local<v8::Value> runtime_second_member_value;
if (!v8Object->Get(context, keys[36].Get(isolate)).ToLocal(&runtime_second_member_value)) { if (!v8Object->Get(context, keys[37].Get(isolate)).ToLocal(&runtime_second_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -976,7 +991,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -976,7 +991,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
if (OriginTrials::FeatureNameEnabled(executionContext)) { if (OriginTrials::FeatureNameEnabled(executionContext)) {
v8::Local<v8::Value> origin_trial_member_value; v8::Local<v8::Value> origin_trial_member_value;
if (!v8Object->Get(context, keys[28].Get(isolate)).ToLocal(&origin_trial_member_value)) { if (!v8Object->Get(context, keys[29].Get(isolate)).ToLocal(&origin_trial_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -992,7 +1007,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value ...@@ -992,7 +1007,7 @@ void V8TestDictionary::ToImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
if (OriginTrials::FeatureName1Enabled(executionContext)) { if (OriginTrials::FeatureName1Enabled(executionContext)) {
v8::Local<v8::Value> origin_trial_second_member_value; v8::Local<v8::Value> origin_trial_second_member_value;
if (!v8Object->Get(context, keys[29].Get(isolate)).ToLocal(&origin_trial_second_member_value)) { if (!v8Object->Get(context, keys[30].Get(isolate)).ToLocal(&origin_trial_second_member_value)) {
exceptionState.RethrowV8Exception(block.Exception()); exceptionState.RethrowV8Exception(block.Exception());
return; return;
} }
...@@ -1324,6 +1339,20 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1324,6 +1339,20 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
return false; return false;
} }
v8::Local<v8::Value> member_with_hyphen_in_name_value;
bool member_with_hyphen_in_name_has_value_or_default = false;
if (impl.hasMemberWithHyphenInName()) {
member_with_hyphen_in_name_value = v8::Boolean::New(isolate, impl.memberWithHyphenInName());
member_with_hyphen_in_name_has_value_or_default = true;
} else {
member_with_hyphen_in_name_value = v8::Boolean::New(isolate, false);
member_with_hyphen_in_name_has_value_or_default = true;
}
if (member_with_hyphen_in_name_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[26].Get(isolate), member_with_hyphen_in_name_value))) {
return false;
}
v8::Local<v8::Value> object_member_value; v8::Local<v8::Value> object_member_value;
bool object_member_has_value_or_default = false; bool object_member_has_value_or_default = false;
if (impl.hasObjectMember()) { if (impl.hasObjectMember()) {
...@@ -1332,7 +1361,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1332,7 +1361,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
object_member_has_value_or_default = true; object_member_has_value_or_default = true;
} }
if (object_member_has_value_or_default && if (object_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[26].Get(isolate), object_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[27].Get(isolate), object_member_value))) {
return false; return false;
} }
...@@ -1347,7 +1376,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1347,7 +1376,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
object_or_null_member_has_value_or_default = true; object_or_null_member_has_value_or_default = true;
} }
if (object_or_null_member_has_value_or_default && if (object_or_null_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[27].Get(isolate), object_or_null_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[28].Get(isolate), object_or_null_member_value))) {
return false; return false;
} }
...@@ -1361,7 +1390,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1361,7 +1390,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
other_double_or_string_member_has_value_or_default = true; other_double_or_string_member_has_value_or_default = true;
} }
if (other_double_or_string_member_has_value_or_default && if (other_double_or_string_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[30].Get(isolate), other_double_or_string_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[31].Get(isolate), other_double_or_string_member_value))) {
return false; return false;
} }
...@@ -1372,7 +1401,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1372,7 +1401,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
public_has_value_or_default = true; public_has_value_or_default = true;
} }
if (public_has_value_or_default && if (public_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[31].Get(isolate), public_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[32].Get(isolate), public_value))) {
return false; return false;
} }
...@@ -1383,7 +1412,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1383,7 +1412,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
record_member_has_value_or_default = true; record_member_has_value_or_default = true;
} }
if (record_member_has_value_or_default && if (record_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[32].Get(isolate), record_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[33].Get(isolate), record_member_value))) {
return false; return false;
} }
...@@ -1396,7 +1425,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1396,7 +1425,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
NOTREACHED(); NOTREACHED();
} }
if (required_callback_function_member_has_value_or_default && if (required_callback_function_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[33].Get(isolate), required_callback_function_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[34].Get(isolate), required_callback_function_member_value))) {
return false; return false;
} }
...@@ -1410,7 +1439,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1410,7 +1439,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
restricted_double_member_has_value_or_default = true; restricted_double_member_has_value_or_default = true;
} }
if (restricted_double_member_has_value_or_default && if (restricted_double_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[34].Get(isolate), restricted_double_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[35].Get(isolate), restricted_double_member_value))) {
return false; return false;
} }
...@@ -1421,7 +1450,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1421,7 +1450,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
string_member_has_value_or_default = true; string_member_has_value_or_default = true;
} }
if (string_member_has_value_or_default && if (string_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[37].Get(isolate), string_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[38].Get(isolate), string_member_value))) {
return false; return false;
} }
...@@ -1435,7 +1464,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1435,7 +1464,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
string_or_null_member_has_value_or_default = true; string_or_null_member_has_value_or_default = true;
} }
if (string_or_null_member_has_value_or_default && if (string_or_null_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[38].Get(isolate), string_or_null_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[39].Get(isolate), string_or_null_member_value))) {
return false; return false;
} }
...@@ -1446,7 +1475,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1446,7 +1475,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
string_or_null_record_member_has_value_or_default = true; string_or_null_record_member_has_value_or_default = true;
} }
if (string_or_null_record_member_has_value_or_default && if (string_or_null_record_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[39].Get(isolate), string_or_null_record_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[40].Get(isolate), string_or_null_record_member_value))) {
return false; return false;
} }
...@@ -1457,7 +1486,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1457,7 +1486,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
string_or_null_sequence_member_has_value_or_default = true; string_or_null_sequence_member_has_value_or_default = true;
} }
if (string_or_null_sequence_member_has_value_or_default && if (string_or_null_sequence_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[40].Get(isolate), string_or_null_sequence_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[41].Get(isolate), string_or_null_sequence_member_value))) {
return false; return false;
} }
...@@ -1471,7 +1500,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1471,7 +1500,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
string_sequence_member_has_value_or_default = true; string_sequence_member_has_value_or_default = true;
} }
if (string_sequence_member_has_value_or_default && if (string_sequence_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[41].Get(isolate), string_sequence_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[42].Get(isolate), string_sequence_member_value))) {
return false; return false;
} }
...@@ -1482,7 +1511,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1482,7 +1511,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
test_enum_or_null_or_test_enum_sequence_member_has_value_or_default = true; test_enum_or_null_or_test_enum_sequence_member_has_value_or_default = true;
} }
if (test_enum_or_null_or_test_enum_sequence_member_has_value_or_default && if (test_enum_or_null_or_test_enum_sequence_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[42].Get(isolate), test_enum_or_null_or_test_enum_sequence_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[43].Get(isolate), test_enum_or_null_or_test_enum_sequence_member_value))) {
return false; return false;
} }
...@@ -1493,7 +1522,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1493,7 +1522,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
test_enum_or_test_enum_or_null_sequence_member_has_value_or_default = true; test_enum_or_test_enum_or_null_sequence_member_has_value_or_default = true;
} }
if (test_enum_or_test_enum_or_null_sequence_member_has_value_or_default && if (test_enum_or_test_enum_or_null_sequence_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[43].Get(isolate), test_enum_or_test_enum_or_null_sequence_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[44].Get(isolate), test_enum_or_test_enum_or_null_sequence_member_value))) {
return false; return false;
} }
...@@ -1504,7 +1533,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1504,7 +1533,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
test_enum_or_test_enum_sequence_member_has_value_or_default = true; test_enum_or_test_enum_sequence_member_has_value_or_default = true;
} }
if (test_enum_or_test_enum_sequence_member_has_value_or_default && if (test_enum_or_test_enum_sequence_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[44].Get(isolate), test_enum_or_test_enum_sequence_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[45].Get(isolate), test_enum_or_test_enum_sequence_member_value))) {
return false; return false;
} }
...@@ -1515,7 +1544,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1515,7 +1544,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
test_interface_2_or_uint8_array_member_has_value_or_default = true; test_interface_2_or_uint8_array_member_has_value_or_default = true;
} }
if (test_interface_2_or_uint8_array_member_has_value_or_default && if (test_interface_2_or_uint8_array_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[45].Get(isolate), test_interface_2_or_uint8_array_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[46].Get(isolate), test_interface_2_or_uint8_array_member_value))) {
return false; return false;
} }
...@@ -1526,7 +1555,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1526,7 +1555,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
test_interface_member_has_value_or_default = true; test_interface_member_has_value_or_default = true;
} }
if (test_interface_member_has_value_or_default && if (test_interface_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[46].Get(isolate), test_interface_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[47].Get(isolate), test_interface_member_value))) {
return false; return false;
} }
...@@ -1537,7 +1566,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1537,7 +1566,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
test_interface_or_null_member_has_value_or_default = true; test_interface_or_null_member_has_value_or_default = true;
} }
if (test_interface_or_null_member_has_value_or_default && if (test_interface_or_null_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[47].Get(isolate), test_interface_or_null_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[48].Get(isolate), test_interface_or_null_member_value))) {
return false; return false;
} }
...@@ -1551,7 +1580,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1551,7 +1580,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
test_interface_sequence_member_has_value_or_default = true; test_interface_sequence_member_has_value_or_default = true;
} }
if (test_interface_sequence_member_has_value_or_default && if (test_interface_sequence_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[48].Get(isolate), test_interface_sequence_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[49].Get(isolate), test_interface_sequence_member_value))) {
return false; return false;
} }
...@@ -1562,7 +1591,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1562,7 +1591,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
test_object_sequence_member_has_value_or_default = true; test_object_sequence_member_has_value_or_default = true;
} }
if (test_object_sequence_member_has_value_or_default && if (test_object_sequence_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[49].Get(isolate), test_object_sequence_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[50].Get(isolate), test_object_sequence_member_value))) {
return false; return false;
} }
...@@ -1576,7 +1605,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1576,7 +1605,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
treat_null_as_string_sequence_member_has_value_or_default = true; treat_null_as_string_sequence_member_has_value_or_default = true;
} }
if (treat_null_as_string_sequence_member_has_value_or_default && if (treat_null_as_string_sequence_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[50].Get(isolate), treat_null_as_string_sequence_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[51].Get(isolate), treat_null_as_string_sequence_member_value))) {
return false; return false;
} }
...@@ -1587,7 +1616,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1587,7 +1616,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
uint8_array_member_has_value_or_default = true; uint8_array_member_has_value_or_default = true;
} }
if (uint8_array_member_has_value_or_default && if (uint8_array_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[51].Get(isolate), uint8_array_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[52].Get(isolate), uint8_array_member_value))) {
return false; return false;
} }
...@@ -1598,7 +1627,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1598,7 +1627,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
union_in_record_member_has_value_or_default = true; union_in_record_member_has_value_or_default = true;
} }
if (union_in_record_member_has_value_or_default && if (union_in_record_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[52].Get(isolate), union_in_record_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[53].Get(isolate), union_in_record_member_value))) {
return false; return false;
} }
...@@ -1612,7 +1641,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1612,7 +1641,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
union_member_with_sequence_default_has_value_or_default = true; union_member_with_sequence_default_has_value_or_default = true;
} }
if (union_member_with_sequence_default_has_value_or_default && if (union_member_with_sequence_default_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[53].Get(isolate), union_member_with_sequence_default_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[54].Get(isolate), union_member_with_sequence_default_value))) {
return false; return false;
} }
...@@ -1623,7 +1652,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1623,7 +1652,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
union_or_null_record_member_has_value_or_default = true; union_or_null_record_member_has_value_or_default = true;
} }
if (union_or_null_record_member_has_value_or_default && if (union_or_null_record_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[54].Get(isolate), union_or_null_record_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[55].Get(isolate), union_or_null_record_member_value))) {
return false; return false;
} }
...@@ -1634,7 +1663,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1634,7 +1663,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
union_or_null_sequence_member_has_value_or_default = true; union_or_null_sequence_member_has_value_or_default = true;
} }
if (union_or_null_sequence_member_has_value_or_default && if (union_or_null_sequence_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[55].Get(isolate), union_or_null_sequence_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[56].Get(isolate), union_or_null_sequence_member_value))) {
return false; return false;
} }
...@@ -1645,7 +1674,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1645,7 +1674,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
union_with_typedefs_has_value_or_default = true; union_with_typedefs_has_value_or_default = true;
} }
if (union_with_typedefs_has_value_or_default && if (union_with_typedefs_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[56].Get(isolate), union_with_typedefs_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[57].Get(isolate), union_with_typedefs_value))) {
return false; return false;
} }
...@@ -1659,7 +1688,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1659,7 +1688,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
unrestricted_double_member_has_value_or_default = true; unrestricted_double_member_has_value_or_default = true;
} }
if (unrestricted_double_member_has_value_or_default && if (unrestricted_double_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[57].Get(isolate), unrestricted_double_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[58].Get(isolate), unrestricted_double_member_value))) {
return false; return false;
} }
...@@ -1673,7 +1702,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1673,7 +1702,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
usv_string_or_null_member_has_value_or_default = true; usv_string_or_null_member_has_value_or_default = true;
} }
if (usv_string_or_null_member_has_value_or_default && if (usv_string_or_null_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[58].Get(isolate), usv_string_or_null_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[59].Get(isolate), usv_string_or_null_member_value))) {
return false; return false;
} }
...@@ -1685,7 +1714,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1685,7 +1714,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
runtime_member_has_value_or_default = true; runtime_member_has_value_or_default = true;
} }
if (runtime_member_has_value_or_default && if (runtime_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[35].Get(isolate), runtime_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[36].Get(isolate), runtime_member_value))) {
return false; return false;
} }
...@@ -1696,7 +1725,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1696,7 +1725,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
runtime_second_member_has_value_or_default = true; runtime_second_member_has_value_or_default = true;
} }
if (runtime_second_member_has_value_or_default && if (runtime_second_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[36].Get(isolate), runtime_second_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[37].Get(isolate), runtime_second_member_value))) {
return false; return false;
} }
} }
...@@ -1709,7 +1738,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1709,7 +1738,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
origin_trial_member_has_value_or_default = true; origin_trial_member_has_value_or_default = true;
} }
if (origin_trial_member_has_value_or_default && if (origin_trial_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[28].Get(isolate), origin_trial_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[29].Get(isolate), origin_trial_member_value))) {
return false; return false;
} }
} }
...@@ -1722,7 +1751,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio ...@@ -1722,7 +1751,7 @@ bool toV8TestDictionary(const TestDictionary& impl, v8::Local<v8::Object> dictio
origin_trial_second_member_has_value_or_default = true; origin_trial_second_member_has_value_or_default = true;
} }
if (origin_trial_second_member_has_value_or_default && if (origin_trial_second_member_has_value_or_default &&
!V8CallBoolean(dictionary->CreateDataProperty(context, keys[29].Get(isolate), origin_trial_second_member_value))) { !V8CallBoolean(dictionary->CreateDataProperty(context, keys[30].Get(isolate), origin_trial_second_member_value))) {
return false; return false;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment