Changeset 234447 in webkit
- Timestamp:
- Jul 31, 2018 8:57:07 PM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r234444 r234447 1 2018-07-31 Alex Christensen <achristensen@webkit.org> 2 3 REGRESSION (r231107): MoviStar+ launches to a blank black screen 4 https://bugs.webkit.org/show_bug.cgi?id=188139 5 6 Reviewed by Brent Fulgham. 7 8 For this app, revert behavior to how it was before r231107 with a linked-on-or-before check. 9 r231107 increased our fetch spec conformance, which we intend to keep. This makes a low-risk 10 targeted fix that will fix the affected app until they update. 11 12 I manually verified this fixes the app. 13 14 * loader/DocumentThreadableLoader.cpp: 15 (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest): 16 * platform/RuntimeApplicationChecks.h: 17 * platform/cocoa/RuntimeApplicationChecksCocoa.mm: 18 (WebCore::applicationSDKVersionOverride): 19 (WebCore::setApplicationSDKVersion): 20 (WebCore::applicationSDKVersion): 21 (WebCore::IOSApplication::isMoviStarPlus): 22 1 23 2018-07-31 Myles C. Maxfield <mmaxfield@apple.com> 2 24 -
trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp
r233720 r234447 51 51 #include "ResourceRequest.h" 52 52 #include "ResourceTiming.h" 53 #include "RuntimeApplicationChecks.h" 53 54 #include "RuntimeEnabledFeatures.h" 54 55 #include "SchemeRegistry.h" … … 60 61 #include <wtf/Assertions.h> 61 62 #include <wtf/Ref.h> 63 64 #if PLATFORM(IOS) 65 #include <wtf/spi/darwin/dyldSPI.h> 66 #endif 62 67 63 68 namespace WebCore { … … 180 185 ASSERT(m_options.mode == FetchOptions::Mode::Cors); 181 186 182 if ((m_options.preflightPolicy == PreflightPolicy::Consider && isSimpleCrossOriginAccessRequest(request.httpMethod(), request.httpHeaderFields())) || m_options.preflightPolicy == PreflightPolicy::Prevent || shouldPerformSecurityChecks()) { 187 #if PLATFORM(IOS) 188 bool needsPreflightQuirk = IOSApplication::isMoviStarPlus() && applicationSDKVersion() < DYLD_IOS_VERSION_12_0 && (m_options.preflightPolicy == PreflightPolicy::Consider || m_options.preflightPolicy == PreflightPolicy::Force); 189 #else 190 bool needsPreflightQuirk = false; 191 #endif 192 193 if ((m_options.preflightPolicy == PreflightPolicy::Consider && isSimpleCrossOriginAccessRequest(request.httpMethod(), request.httpHeaderFields())) || m_options.preflightPolicy == PreflightPolicy::Prevent || (shouldPerformSecurityChecks() && !needsPreflightQuirk)) { 183 194 if (checkURLSchemeAsCORSEnabled(request.url())) 184 195 makeSimpleCrossOriginAccessRequest(WTFMove(request)); … … 195 206 } 196 207 #endif 197 if (! checkURLSchemeAsCORSEnabled(request.url()))208 if (!needsPreflightQuirk && !checkURLSchemeAsCORSEnabled(request.url())) 198 209 return; 199 210 -
trunk/Source/WebCore/platform/RuntimeApplicationChecks.h
r233466 r234447 42 42 43 43 bool isInWebProcess(); 44 45 WEBCORE_EXPORT void setApplicationSDKVersion(uint32_t); 46 uint32_t applicationSDKVersion(); 44 47 45 48 WEBCORE_EXPORT void setApplicationBundleIdentifier(const String&); … … 87 90 WEBCORE_EXPORT bool isCardiogram(); 88 91 WEBCORE_EXPORT bool isNike(); 92 bool isMoviStarPlus(); 89 93 90 94 } // IOSApplication -
trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm
r233466 r234447 32 32 #import <wtf/NeverDestroyed.h> 33 33 #import <wtf/RunLoop.h> 34 #import <wtf/spi/darwin/dyldSPI.h> 34 35 #import <wtf/text/WTFString.h> 35 36 … … 66 67 } 67 68 69 static std::optional<uint32_t>& applicationSDKVersionOverride() 70 { 71 static NeverDestroyed<std::optional<uint32_t>> version; 72 return version; 73 } 74 75 void setApplicationSDKVersion(uint32_t version) 76 { 77 applicationSDKVersionOverride() = version; 78 } 79 80 uint32_t applicationSDKVersion() 81 { 82 if (applicationSDKVersionOverride()) 83 return *applicationSDKVersionOverride(); 84 return dyld_get_program_sdk_version(); 85 } 86 68 87 bool isInWebProcess() 69 88 { … … 255 274 } 256 275 276 bool IOSApplication::isMoviStarPlus() 277 { 278 static bool isMoviStarPlus = applicationBundleIsEqualTo("com.prisatv.yomvi"_s); 279 return isMoviStarPlus; 280 } 281 257 282 #endif 258 283 -
trunk/Source/WebKit/ChangeLog
r234445 r234447 1 2018-07-31 Alex Christensen <achristensen@webkit.org> 2 3 REGRESSION (r231107): MoviStar+ launches to a blank black screen 4 https://bugs.webkit.org/show_bug.cgi?id=188139 5 6 Reviewed by Brent Fulgham. 7 8 Add infrastructure to check UIProcess SDK from the WebProcess and NetworkProcess for linked-on-or-after checks. 9 10 * NetworkProcess/NetworkProcessCreationParameters.cpp: 11 (WebKit::NetworkProcessCreationParameters::encode const): 12 (WebKit::NetworkProcessCreationParameters::decode): 13 * NetworkProcess/NetworkProcessCreationParameters.h: 14 * NetworkProcess/cocoa/NetworkProcessCocoa.mm: 15 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa): 16 * Shared/WebProcessCreationParameters.cpp: 17 (WebKit::WebProcessCreationParameters::encode const): 18 (WebKit::WebProcessCreationParameters::decode): 19 * Shared/WebProcessCreationParameters.h: 20 * UIProcess/Cocoa/WebProcessPoolCocoa.mm: 21 (WebKit::WebProcessPool::platformInitializeWebProcess): 22 (WebKit::WebProcessPool::platformInitializeNetworkProcess): 23 * WebProcess/cocoa/WebProcessCocoa.mm: 24 (WebKit::WebProcess::platformInitializeWebProcess): 25 1 26 2018-07-31 Ryosuke Niwa <rniwa@webkit.org> 2 27 -
trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp
r234440 r234447 70 70 encoder << parentProcessName; 71 71 encoder << uiProcessBundleIdentifier; 72 encoder << uiProcessSDKVersion; 72 73 encoder << sourceApplicationBundleIdentifier; 73 74 encoder << sourceApplicationSecondaryIdentifier; … … 184 185 if (!decoder.decode(result.uiProcessBundleIdentifier)) 185 186 return false; 187 if (!decoder.decode(result.uiProcessSDKVersion)) 188 return false; 186 189 if (!decoder.decode(result.sourceApplicationBundleIdentifier)) 187 190 return false; -
trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h
r234440 r234447 83 83 String parentProcessName; 84 84 String uiProcessBundleIdentifier; 85 uint32_t uiProcessSDKVersion { 0 }; 85 86 String sourceApplicationBundleIdentifier; 86 87 String sourceApplicationSecondaryIdentifier; -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm
r234440 r234447 75 75 { 76 76 WebCore::setApplicationBundleIdentifier(parameters.uiProcessBundleIdentifier); 77 WebCore::setApplicationSDKVersion(parameters.uiProcessSDKVersion); 77 78 78 79 #if PLATFORM(IOS) -
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
r232535 r234447 104 104 #if PLATFORM(COCOA) 105 105 encoder << uiProcessBundleIdentifier; 106 encoder << uiProcessSDKVersion; 106 107 #endif 107 108 encoder << presentingApplicationPID; … … 320 321 if (!decoder.decode(parameters.uiProcessBundleIdentifier)) 321 322 return false; 323 if (!decoder.decode(parameters.uiProcessSDKVersion)) 324 return false; 322 325 #endif 323 326 if (!decoder.decode(parameters.presentingApplicationPID)) -
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
r232535 r234447 147 147 #if PLATFORM(COCOA) 148 148 String uiProcessBundleIdentifier; 149 uint32_t uiProcessSDKVersion { 0 }; 149 150 #endif 150 151 -
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
r234440 r234447 53 53 #import <sys/param.h> 54 54 #import <wtf/ProcessPrivilege.h> 55 #import <wtf/spi/darwin/dyldSPI.h> 55 56 56 57 #if PLATFORM(IOS) … … 206 207 207 208 parameters.uiProcessBundleIdentifier = String([[NSBundle mainBundle] bundleIdentifier]); 209 parameters.uiProcessSDKVersion = dyld_get_program_sdk_version(); 208 210 209 211 #if PLATFORM(IOS) … … 292 294 parameters.parentProcessName = [[NSProcessInfo processInfo] processName]; 293 295 parameters.uiProcessBundleIdentifier = [[NSBundle mainBundle] bundleIdentifier]; 296 parameters.uiProcessSDKVersion = dyld_get_program_sdk_version(); 294 297 295 298 NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; -
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
r234382 r234447 125 125 126 126 WebCore::setApplicationBundleIdentifier(parameters.uiProcessBundleIdentifier); 127 WebCore::setApplicationSDKVersion(parameters.uiProcessSDKVersion); 128 127 129 SessionTracker::setIdentifierBase(parameters.uiProcessBundleIdentifier); 128 130
Note: See TracChangeset
for help on using the changeset viewer.