Modified: trunk/Source/WebCore/ChangeLog (200291 => 200292)
--- trunk/Source/WebCore/ChangeLog 2016-04-30 19:16:00 UTC (rev 200291)
+++ trunk/Source/WebCore/ChangeLog 2016-04-30 19:34:01 UTC (rev 200292)
@@ -1,5 +1,11 @@
2016-04-30 Darin Adler <[email protected]>
+ Fixed expected results from bindings tests.
+
+ * bindings/scripts/test/JS/JSTestObj.cpp: Regenerated.
+
+2016-04-30 Darin Adler <[email protected]>
+
Next batch of conversions to use C++ enum class instead of strings for enumerations
https://bugs.webkit.org/show_bug.cgi?id=157232
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (200291 => 200292)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2016-04-30 19:16:00 UTC (rev 200291)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2016-04-30 19:34:01 UTC (rev 200292)
@@ -91,7 +91,7 @@
JSString* jsStringWithCache(ExecState*, TestEnumType);
Optional<TestEnumType> parseTestEnumType(ExecState&, JSValue);
-extern const char* const expectedEnumerationValuesTestEnumType;
+extern const char expectedEnumerationValuesTestEnumType[];
JSString* jsStringWithCache(ExecState* state, TestEnumType enumerationValue)
{
@@ -127,11 +127,11 @@
return Nullopt;
}
-const char* const expectedEnumerationValuesTestEnumType = "\"\", \"EnumValue1\", \"EnumValue2\", \"EnumValue3\"";
+const char expectedEnumerationValuesTestEnumType[] = "\"\", \"EnumValue1\", \"EnumValue2\", \"EnumValue3\"";
JSString* jsStringWithCache(ExecState*, Optional);
Optional<Optional> parseOptional(ExecState&, JSValue);
-extern const char* const expectedEnumerationValuesOptional;
+extern const char expectedEnumerationValuesOptional[];
JSString* jsStringWithCache(ExecState* state, Optional enumerationValue)
{
@@ -167,7 +167,7 @@
return Nullopt;
}
-const char* const expectedEnumerationValuesOptional = "\"\", \"OptionalValue1\", \"OptionalValue2\", \"OptionalValue3\"";
+const char expectedEnumerationValuesOptional[] = "\"\", \"OptionalValue1\", \"OptionalValue2\", \"OptionalValue3\"";
// Functions
@@ -3800,7 +3800,7 @@
auto optionalValue = parseTestEnumType(*state, enumArgValue);
if (UNLIKELY(state->hadException()))
return JSValue::encode(jsUndefined());
- if (!optionalValue)
+ if (UNLIKELY(!optionalValue))
return throwArgumentMustBeEnumError(*state, 0, "enumArg", "TestObj", "methodWithEnumArg", expectedEnumerationValuesTestEnumType);
enumArg = optionalValue.value();
impl.methodWithEnumArg(enumArg);
@@ -3823,7 +3823,7 @@
auto optionalValue = parseTestEnumType(*state, enumArgValue);
if (UNLIKELY(state->hadException()))
return JSValue::encode(jsUndefined());
- if (!optionalValue)
+ if (UNLIKELY(!optionalValue))
return throwArgumentMustBeEnumError(*state, 0, "enumArg", "TestObj", "methodWithOptionalEnumArgAndDefaultValue", expectedEnumerationValuesTestEnumType);
enumArg = optionalValue.value();
}