OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
6 | 6 |
7 #include "config.h" | 7 #include "config.h" |
8 #include "V8TestDictionary.h" | 8 #include "V8TestDictionary.h" |
9 | 9 |
10 #include "bindings/core/v8/Dictionary.h" | 10 #include "bindings/core/v8/Dictionary.h" |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 if (!v8Object->Get(isolate->GetCurrentContext(), v8String(isolate, "enum
Member")).ToLocal(&enumMemberValue)) { | 199 if (!v8Object->Get(isolate->GetCurrentContext(), v8String(isolate, "enum
Member")).ToLocal(&enumMemberValue)) { |
200 exceptionState.rethrowV8Exception(block.Exception()); | 200 exceptionState.rethrowV8Exception(block.Exception()); |
201 return; | 201 return; |
202 } | 202 } |
203 if (enumMemberValue.IsEmpty() || enumMemberValue->IsUndefined()) { | 203 if (enumMemberValue.IsEmpty() || enumMemberValue->IsUndefined()) { |
204 // Do nothing. | 204 // Do nothing. |
205 } else { | 205 } else { |
206 V8StringResource<> enumMember = enumMemberValue; | 206 V8StringResource<> enumMember = enumMemberValue; |
207 if (!enumMember.prepare(exceptionState)) | 207 if (!enumMember.prepare(exceptionState)) |
208 return; | 208 return; |
209 static const char* validValues[] = { | 209 const char* validValues[] = { |
210 "", | 210 "", |
211 "EnumValue1", | 211 "EnumValue1", |
212 "EnumValue2", | 212 "EnumValue2", |
213 "EnumValue3", | 213 "EnumValue3", |
214 }; | 214 }; |
215 if (!isValidEnum(enumMember, validValues, WTF_ARRAY_LENGTH(validValu
es), "TestEnum", exceptionState)) | 215 if (!isValidEnum(enumMember, validValues, WTF_ARRAY_LENGTH(validValu
es), "TestEnum", exceptionState)) |
216 return; | 216 return; |
217 impl.setEnumMember(enumMember); | 217 impl.setEnumMember(enumMember); |
218 } | 218 } |
219 } | 219 } |
220 | 220 |
221 { | 221 { |
222 v8::Local<v8::Value> enumSequenceMemberValue; | 222 v8::Local<v8::Value> enumSequenceMemberValue; |
223 if (!v8Object->Get(isolate->GetCurrentContext(), v8String(isolate, "enum
SequenceMember")).ToLocal(&enumSequenceMemberValue)) { | 223 if (!v8Object->Get(isolate->GetCurrentContext(), v8String(isolate, "enum
SequenceMember")).ToLocal(&enumSequenceMemberValue)) { |
224 exceptionState.rethrowV8Exception(block.Exception()); | 224 exceptionState.rethrowV8Exception(block.Exception()); |
225 return; | 225 return; |
226 } | 226 } |
227 if (enumSequenceMemberValue.IsEmpty() || enumSequenceMemberValue->IsUnde
fined()) { | 227 if (enumSequenceMemberValue.IsEmpty() || enumSequenceMemberValue->IsUnde
fined()) { |
228 // Do nothing. | 228 // Do nothing. |
229 } else { | 229 } else { |
230 Vector<String> enumSequenceMember = toImplArray<Vector<String>>(enum
SequenceMemberValue, 0, isolate, exceptionState); | 230 Vector<String> enumSequenceMember = toImplArray<Vector<String>>(enum
SequenceMemberValue, 0, isolate, exceptionState); |
231 if (exceptionState.hadException()) | 231 if (exceptionState.hadException()) |
232 return; | 232 return; |
233 static const char* validValues[] = { | 233 const char* validValues[] = { |
234 "", | 234 "", |
235 "EnumValue1", | 235 "EnumValue1", |
236 "EnumValue2", | 236 "EnumValue2", |
237 "EnumValue3", | 237 "EnumValue3", |
238 }; | 238 }; |
239 if (!isValidEnum(enumSequenceMember, validValues, WTF_ARRAY_LENGTH(v
alidValues), "TestEnum", exceptionState)) | 239 if (!isValidEnum(enumSequenceMember, validValues, WTF_ARRAY_LENGTH(v
alidValues), "TestEnum", exceptionState)) |
240 return; | 240 return; |
241 impl.setEnumSequenceMember(enumSequenceMember); | 241 impl.setEnumSequenceMember(enumSequenceMember); |
242 } | 242 } |
243 } | 243 } |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
870 } | 870 } |
871 | 871 |
872 TestDictionary NativeValueTraits<TestDictionary>::nativeValue(v8::Isolate* isola
te, v8::Local<v8::Value> value, ExceptionState& exceptionState) | 872 TestDictionary NativeValueTraits<TestDictionary>::nativeValue(v8::Isolate* isola
te, v8::Local<v8::Value> value, ExceptionState& exceptionState) |
873 { | 873 { |
874 TestDictionary impl; | 874 TestDictionary impl; |
875 V8TestDictionary::toImpl(isolate, value, impl, exceptionState); | 875 V8TestDictionary::toImpl(isolate, value, impl, exceptionState); |
876 return impl; | 876 return impl; |
877 } | 877 } |
878 | 878 |
879 } // namespace blink | 879 } // namespace blink |
OLD | NEW |