Title: [249073] trunk/Source/_javascript_Core
- Revision
- 249073
- Author
- ross.kirsl...@sony.com
- Date
- 2019-08-23 15:56:58 -0700 (Fri, 23 Aug 2019)
Log Message
Unreviewed WinCairo build fix following r249058.
* API/tests/testapi.cpp:
(TestAPI::callFunction):
WinCairo chokes on `JSValueRef args[sizeof...(arguments)]` when there are no arguments, but AppleWin does not...
MSVC must have changed somehow.
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/API/tests/testapi.cpp (249072 => 249073)
--- trunk/Source/_javascript_Core/API/tests/testapi.cpp 2019-08-23 22:54:48 UTC (rev 249072)
+++ trunk/Source/_javascript_Core/API/tests/testapi.cpp 2019-08-23 22:56:58 UTC (rev 249073)
@@ -202,6 +202,30 @@
return Unexpected<JSValueRef>(exception);
}
+#if COMPILER(MSVC)
+template<>
+TestAPI::ScriptResult TestAPI::callFunction(const char* functionSource)
+{
+ JSValueRef function;
+ {
+ ScriptResult functionResult = evaluateScript(functionSource);
+ if (!functionResult)
+ return functionResult;
+ function = functionResult.value();
+ }
+
+ JSValueRef exception = nullptr;
+ if (JSObjectRef functionObject = JSValueToObject(context, function, &exception)) {
+ JSValueRef result = JSObjectCallAsFunction(context, functionObject, functionObject, 0, nullptr, &exception);
+ if (!exception)
+ return ScriptResult(result);
+ }
+
+ RELEASE_ASSERT(exception);
+ return Unexpected<JSValueRef>(exception);
+}
+#endif
+
template<typename... ArgumentTypes>
bool TestAPI::functionReturnsTrue(const char* functionSource, ArgumentTypes... arguments)
{
Modified: trunk/Source/_javascript_Core/ChangeLog (249072 => 249073)
--- trunk/Source/_javascript_Core/ChangeLog 2019-08-23 22:54:48 UTC (rev 249072)
+++ trunk/Source/_javascript_Core/ChangeLog 2019-08-23 22:56:58 UTC (rev 249073)
@@ -1,3 +1,12 @@
+2019-08-23 Ross Kirsling <ross.kirsl...@sony.com>
+
+ Unreviewed WinCairo build fix following r249058.
+
+ * API/tests/testapi.cpp:
+ (TestAPI::callFunction):
+ WinCairo chokes on `JSValueRef args[sizeof...(arguments)]` when there are no arguments, but AppleWin does not...
+ MSVC must have changed somehow.
+
2019-08-23 Justin Michaud <justin_mich...@apple.com>
[WASM-References] Do not overwrite argument registers in jsCallEntrypoint
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes