| Index: Source/bindings/tests/results/core/V8TestDictionary.cpp
|
| diff --git a/Source/bindings/tests/results/core/V8TestDictionary.cpp b/Source/bindings/tests/results/core/V8TestDictionary.cpp
|
| index 62cd43d3da1ece5601f0e2149585d5b383255f6e..088862607e5983fb5e0dc67978c1d2f1a581e6ff 100644
|
| --- a/Source/bindings/tests/results/core/V8TestDictionary.cpp
|
| +++ b/Source/bindings/tests/results/core/V8TestDictionary.cpp
|
| @@ -130,9 +130,14 @@ void V8TestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value
|
| V8StringResource<> enumMember = enumMemberValue;
|
| if (!enumMember.prepare(exceptionState))
|
| return;
|
| - String string = enumMember;
|
| - if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || string == "EnumValue3")) {
|
| - exceptionState.throwTypeError("member enumMember ('" + string + "') is not a valid enum value.");
|
| + const char* validValues[] = {
|
| + "",
|
| + "EnumValue1",
|
| + "EnumValue2",
|
| + "EnumValue3",
|
| + };
|
| + if (!isValidEnum(enumMember, validValues, 4)) {
|
| + exceptionState.throwTypeError("member enumMember is not a valid enum value.");
|
| return;
|
| }
|
| impl.setEnumMember(enumMember);
|
|
|