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

Side by Side Diff: Source/bindings/tests/results/core/V8TestDictionary.cpp

Issue 831483004: IDL: Make enums have global visibility (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
OLDNEW
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/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 v8::Local<v8::Value> enumMemberValue = v8Object->Get(v8String(isolate, "enum Member")); 118 v8::Local<v8::Value> enumMemberValue = v8Object->Get(v8String(isolate, "enum Member"));
119 if (block.HasCaught()) { 119 if (block.HasCaught()) {
120 exceptionState.rethrowV8Exception(block.Exception()); 120 exceptionState.rethrowV8Exception(block.Exception());
121 return; 121 return;
122 } 122 }
123 if (enumMemberValue.IsEmpty() || enumMemberValue->IsUndefined()) { 123 if (enumMemberValue.IsEmpty() || enumMemberValue->IsUndefined()) {
124 // Do nothing. 124 // Do nothing.
125 } else { 125 } else {
126 TOSTRING_VOID(V8StringResource<>, enumMember, enumMemberValue); 126 TOSTRING_VOID(V8StringResource<>, enumMember, enumMemberValue);
127 String string = enumMember; 127 String string = enumMember;
128 if (!(string == "foo" || string == "bar" || string == "baz")) { 128 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" | | string == "EnumValue3")) {
129 exceptionState.throwTypeError("member enumMember ('" + string + "') is not a valid enum value."); 129 exceptionState.throwTypeError("member enumMember ('" + string + "') is not a valid enum value.");
130 return; 130 return;
131 } 131 }
132 impl.setEnumMember(enumMember); 132 impl.setEnumMember(enumMember);
133 } 133 }
134 134
135 v8::Local<v8::Value> eventTargetMemberValue = v8Object->Get(v8String(isolate , "eventTargetMember")); 135 v8::Local<v8::Value> eventTargetMemberValue = v8Object->Get(v8String(isolate , "eventTargetMember"));
136 if (block.HasCaught()) { 136 if (block.HasCaught()) {
137 exceptionState.rethrowV8Exception(block.Exception()); 137 exceptionState.rethrowV8Exception(block.Exception());
138 return; 138 return;
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 } 507 }
508 508
509 TestDictionary NativeValueTraits<TestDictionary>::nativeValue(const v8::Local<v8 ::Value>& value, v8::Isolate* isolate, ExceptionState& exceptionState) 509 TestDictionary NativeValueTraits<TestDictionary>::nativeValue(const v8::Local<v8 ::Value>& value, v8::Isolate* isolate, ExceptionState& exceptionState)
510 { 510 {
511 TestDictionary impl; 511 TestDictionary impl;
512 V8TestDictionary::toImpl(isolate, value, impl, exceptionState); 512 V8TestDictionary::toImpl(isolate, value, impl, exceptionState);
513 return impl; 513 return impl;
514 } 514 }
515 515
516 } // namespace blink 516 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/idls/modules/TestPartialInterface3.idl ('k') | Source/bindings/tests/results/core/V8TestInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698