RESOLVED FIXED 222388
Add stubs to enable SafariForWebKitDevelopment to launch
https://bugs.webkit.org/show_bug.cgi?id=222388
Summary Add stubs to enable SafariForWebKitDevelopment to launch
Alex Christensen
Reported 2021-02-24 15:08:18 PST
Add stubs to enable SafariForWebKitDevelopment to launch
Attachments
Patch (9.91 KB, patch)
2021-02-24 15:12 PST, Alex Christensen
no flags
Patch (9.91 KB, patch)
2021-02-24 15:15 PST, Alex Christensen
no flags
Patch (12.21 KB, patch)
2021-02-25 13:28 PST, Alex Christensen
no flags
Alex Christensen
Comment 1 2021-02-24 15:12:56 PST
Alex Christensen
Comment 2 2021-02-24 15:15:00 PST
Myles C. Maxfield
Comment 3 2021-02-24 16:27:25 PST
Comment on attachment 421466 [details] Patch r=mews
Alex Christensen
Comment 4 2021-02-24 20:57:55 PST
WebKit Commit Bot
Comment 5 2021-02-25 07:04:30 PST
Re-opened since this is blocked by bug 222417
Alexey Proskuryakov
Comment 6 2021-02-25 10:58:19 PST
This somehow made all tests crash, https://build.webkit.org/#/builders/36
Alexey Proskuryakov
Comment 7 2021-02-25 11:03:44 PST
Comment on attachment 421466 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=421466&action=review > Source/JavaScriptCore/runtime/SymbolStubsForSafariCompatibility.mm:30 > +#if defined __MAC_OS_X_VERSION_MIN_REQUIRED && __MAC_OS_X_VERSION_MIN_REQUIRED < 110300 I'm not sure if this does what you want it to do. __MAC_OS_X_VERSION_MIN_REQUIRED is the deployment version, which I don't think gets updated for minor macOS releases. > Source/JavaScriptCore/runtime/SymbolStubsForSafariCompatibility.mm:33 > +// Remove them after rdar://problem/74245355 is fixed and after we no longer support Big Sur. The second part is not technically correct. It's enough to no longer support versions of Safari that don't have the fix (which will happens years earlier than not supporting the OS). We only keep WebKit trunk compatible with latest shipping Safari version.
Alex Christensen
Comment 8 2021-02-25 11:08:34 PST
Comment on attachment 421466 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=421466&action=review > Source/JavaScriptCore/runtime/SymbolStubsForSafariCompatibility.mm:42 > +String::String(NSString *) { } This made tests crash in debug. I need to make this actually call the correct code or the linker gets confused when it doesn't inline the real String(NSString*)
Alex Christensen
Comment 9 2021-02-25 13:28:49 PST
EWS
Comment 10 2021-02-25 15:21:05 PST
Committed r273515: <https://commits.webkit.org/r273515> All reviewed patches have been landed. Closing bug and clearing flags on attachment 421559 [details].
Radar WebKit Bug Importer
Comment 11 2021-02-25 15:22:13 PST
Darin Adler
Comment 12 2021-02-25 15:28:51 PST
Comment on attachment 421559 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=421559&action=review > Source/WTF/wtf/text/WTFString.h:327 > +#if HAVE(SAFARI_FOR_WEBKIT_DEVELOPMENT_REQUIRING_EXTRA_SYMBOLS) > + WTF_EXPORT_PRIVATE String(NSString *); > +#else > String(NSString *string) > : String((__bridge CFStringRef)string) { } > +#endif Is there any way to keep the inlining but also have the externally exported symbol for the HAVE(SAFARI_FOR_WEBKIT_DEVELOPMENT_REQUIRING_EXTRA_SYMBOLS) case?
Alex Christensen
Comment 13 2021-02-25 16:33:45 PST
My first attempt at just making a stub symbol for WTF::String::String(NSString *) seems to have worked in release builds where it is always inlined but not debug builds where it is sometimes not inlined. We could take advantage of that, but it sounds overly complicated and fragile. I think one function call on operating systems where the function call was always there won't hurt things too badly.
Note You need to log in before you can comment on or make changes to this bug.