[webkit-reviews] review granted: [Bug 216106] [iOS WK1] Crashes when using ANGLE WebGL from another thread : [Attachment 410207] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 1 14:58:15 PDT 2020


Dean Jackson <dino at apple.com> has granted Kimmo Kinnunen
<kkinnunen at apple.com>'s request for review:
Bug 216106: [iOS WK1] Crashes when using ANGLE WebGL from another thread
https://bugs.webkit.org/show_bug.cgi?id=216106

Attachment 410207: Patch

https://bugs.webkit.org/attachment.cgi?id=410207&action=review




--- Comment #33 from Dean Jackson <dino at apple.com> ---
Comment on attachment 410207
  --> https://bugs.webkit.org/attachment.cgi?id=410207
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=410207&action=review

Thanks so much Kimmo. This is awesome.

> Source/ThirdParty/ANGLE/ChangeLog:16
> +	   gl function if the client knowns the platform state might

typo: knows

> Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:74
> +WK_OPENGL_LDFLAGS = $(WK_OPENGL_LDFLAGS_$(WK_PLATFORM_NAME));
> +WK_OPENGL_LDFLAGS_iphoneos = -framework OpenGLES;
> +WK_OPENGL_LDFLAGS_maccatalyst = -framework OpenGL;
> +WK_OPENGL_LDFLAGS_iphonesimulator = -framework OpenGLES;
> +WK_OPENGL_LDFLAGS_watchos = $(WK_OPENGL_LDFLAGS_iphoneos);
> +WK_OPENGL_LDFLAGS_watchsimulator = $(WK_OPENGL_LDFLAGS_iphonesimulator);
> +WK_OPENGL_LDFLAGS_appletvos = $(WK_OPENGL_LDFLAGS_iphoneos);
> +WK_OPENGL_LDFLAGS_appletvsimulator = $(WK_OPENGL_LDFLAGS_iphonesimulator);
> +WK_OPENGL_LDFLAGS_macosx = -framework OpenGL;
> +
> +OTHER_LDFLAGS = $(inherited) $(UNEXPORTED_SYMBOL_LDFLAGS) -lgtest
-force_load $(BUILT_PRODUCTS_DIR)/libTestWebKitAPI.a -framework JavaScriptCore
-framework WebKit -lWebCoreTestSupport $(WK_AUTHKIT_LDFLAGS) -framework Network
$(WK_PDFKIT_LDFLAGS) $(WK_HID_LDFLAGS) $(WK_OPENGL_LDFLAGS)
$(OTHER_LDFLAGS_PLATFORM_$(WK_COCOA_TOUCH));

This is ok for the moment, but I just made a change to NOT link to OpenGL in
all our frameworks, and instead soft-link. The problem is with iOS apps on
Apple Silicon, where we need to decide at runtime whether to use GLES or GL.

>
Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/WebGLNoCrashOnOtherThreadAccess.mm:1
80
> +    [uiWebView stringByEvaluatingJavaScriptFromString:@"runTestAsync();"];

It would also be possible to have a test that dispatches touch events rather
than evaluating JS, which would exercise the main/UI thread entry.


More information about the webkit-reviews mailing list