Use _CFURLConnectionSetFrameworkStubs instead of DYLD_INTERPOSE on Apple Silicon Macs
Created attachment 412493 [details] Patch
Comment on attachment 412493 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=412493&action=review > Source/WebKit/Shared/mac/SecItemShim.cpp:146 > -#if PLATFORM(IOS_FAMILY) > +#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && !CPU(X86_64)) How about this instead: #if !CPU(X86_64) It doesn’t seem like we need IOS_FAMILY vs. MAC here. > Source/WebKit/Shared/mac/SecItemShim.cpp:158 > -#if PLATFORM(MAC) > +#if PLATFORM(MAC) && CPU(X86_64) How about this instead: #if CPU(X86_64) Or: #else It doesn’t seem like we need IOS_FAMILY vs. MAC here.
Comment on attachment 412493 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=412493&action=review >> Source/WebKit/Shared/mac/SecItemShim.cpp:146 >> +#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && !CPU(X86_64)) > > How about this instead: > > #if !CPU(X86_64) > > It doesn’t seem like we need IOS_FAMILY vs. MAC here. I believe the iOS Simulator is x86_64 but doesn’t have the interposing shim.
http://trac.webkit.org/r269094
<rdar://problem/70749479>
I would propose we use a more clear USE(DYLD_INTERPOSE_FOR_SEC_ITEM_SHIM) or something like that.
I would propose we stop using DYLD_INTERPOSE entirely and replace it with _CFURLConnectionSetFrameworkStubs in the short term and a per-NSURLSession solution I have yet to write in the long term. Given the nature of this radar, though, I wanted the absolute minimum risk and the easiest cherry picking to the branch.