WebKit Bugzilla
Attachment 346247 Details for
Bug 188139
: REGRESSION (r231107): MoviStar+ launches to a blank black screen
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188139-20180731183818.patch (text/plain), 13.07 KB, created by
Alex Christensen
on 2018-07-31 18:38:20 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2018-07-31 18:38:20 PDT
Size:
13.07 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 234434) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,25 @@ >+2018-07-31 Daniel Bates <dabates@apple.com> and Alex Christensen <achristensen@webkit.org> >+ >+ REGRESSION (r231107): MoviStar+ launches to a blank black screen >+ https://bugs.webkit.org/show_bug.cgi?id=188139 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ For this app, revert behavior to how it was before r231107 with a linked-on-or-before check. >+ r231107 increased our fetch spec conformance, which we intend to keep. This makes a low-risk >+ targeted fix that will fix the affected app until they update. >+ >+ I manually verified this fixes the app. >+ >+ * loader/DocumentThreadableLoader.cpp: >+ (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest): >+ * platform/RuntimeApplicationChecks.h: >+ * platform/cocoa/RuntimeApplicationChecksCocoa.mm: >+ (WebCore::applicationSDKVersionOverride): >+ (WebCore::setApplicationSDKVersion): >+ (WebCore::applicationSDKVersion): >+ (WebCore::IOSApplication::isMoviStarPlus): >+ > 2018-07-31 Yusuke Suzuki <utatane.tea@gmail.com> > > Clean up TransformationMatrix implementation >Index: Source/WebCore/loader/DocumentThreadableLoader.cpp >=================================================================== >--- Source/WebCore/loader/DocumentThreadableLoader.cpp (revision 234434) >+++ Source/WebCore/loader/DocumentThreadableLoader.cpp (working copy) >@@ -50,6 +50,7 @@ > #include "ResourceError.h" > #include "ResourceRequest.h" > #include "ResourceTiming.h" >+#include "RuntimeApplicationChecks.h" > #include "RuntimeEnabledFeatures.h" > #include "SchemeRegistry.h" > #include "SecurityOrigin.h" >@@ -60,6 +61,10 @@ > #include <wtf/Assertions.h> > #include <wtf/Ref.h> > >+#if PLATFORM(IOS) >+#include <wtf/spi/darwin/dyldSPI.h> >+#endif >+ > namespace WebCore { > > void DocumentThreadableLoader::loadResourceSynchronously(Document& document, ResourceRequest&& request, ThreadableLoaderClient& client, const ThreadableLoaderOptions& options, RefPtr<SecurityOrigin>&& origin, std::unique_ptr<ContentSecurityPolicy>&& contentSecurityPolicy) >@@ -179,7 +184,13 @@ void DocumentThreadableLoader::makeCross > { > ASSERT(m_options.mode == FetchOptions::Mode::Cors); > >- if ((m_options.preflightPolicy == PreflightPolicy::Consider && isSimpleCrossOriginAccessRequest(request.httpMethod(), request.httpHeaderFields())) || m_options.preflightPolicy == PreflightPolicy::Prevent || shouldPerformSecurityChecks()) { >+#if PLATFORM(IOS) >+ bool needsPreflightQuirk = IOSApplication::isMoviStarPlus() && applicationSDKVersion() < DYLD_IOS_VERSION_12_0 && (m_options.preflightPolicy == PreflightPolicy::Consider || m_options.preflightPolicy == PreflightPolicy::Force); >+#else >+ bool needsPreflightQuirk = false; >+#endif >+ >+ if ((m_options.preflightPolicy == PreflightPolicy::Consider && isSimpleCrossOriginAccessRequest(request.httpMethod(), request.httpHeaderFields())) || m_options.preflightPolicy == PreflightPolicy::Prevent || (shouldPerformSecurityChecks() && !needsPreflightQuirk)) { > if (checkURLSchemeAsCORSEnabled(request.url())) > makeSimpleCrossOriginAccessRequest(WTFMove(request)); > } else { >@@ -194,7 +205,7 @@ void DocumentThreadableLoader::makeCross > } > } > #endif >- if (!checkURLSchemeAsCORSEnabled(request.url())) >+ if (!needsPreflightQuirk && !checkURLSchemeAsCORSEnabled(request.url())) > return; > > m_simpleRequest = false; >Index: Source/WebCore/platform/RuntimeApplicationChecks.h >=================================================================== >--- Source/WebCore/platform/RuntimeApplicationChecks.h (revision 234434) >+++ Source/WebCore/platform/RuntimeApplicationChecks.h (working copy) >@@ -42,6 +42,9 @@ inline bool isInWebProcess() { return tr > > bool isInWebProcess(); > >+WEBCORE_EXPORT void setApplicationSDKVersion(uint32_t); >+uint32_t applicationSDKVersion(); >+ > WEBCORE_EXPORT void setApplicationBundleIdentifier(const String&); > String applicationBundleIdentifier(); > >@@ -86,6 +89,7 @@ bool isIBooksStorytime(); > WEBCORE_EXPORT bool isTheSecretSocietyHiddenMystery(); > WEBCORE_EXPORT bool isCardiogram(); > WEBCORE_EXPORT bool isNike(); >+bool isMoviStarPlus(); > > } // IOSApplication > >Index: Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm >=================================================================== >--- Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm (revision 234434) >+++ Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm (working copy) >@@ -31,6 +31,7 @@ > #import <Foundation/NSBundle.h> > #import <wtf/NeverDestroyed.h> > #import <wtf/RunLoop.h> >+#import <wtf/spi/darwin/dyldSPI.h> > #import <wtf/text/WTFString.h> > > namespace WebCore { >@@ -65,6 +66,24 @@ void setApplicationBundleIdentifier(cons > applicationBundleIdentifierOverride() = bundleIdentifier; > } > >+static std::optional<uint32_t>& applicationSDKVersionOverride() >+{ >+ static NeverDestroyed<std::optional<uint32_t>> version; >+ return version; >+} >+ >+void setApplicationSDKVersion(uint32_t version) >+{ >+ applicationSDKVersionOverride() = version; >+} >+ >+uint32_t applicationSDKVersion() >+{ >+ if (applicationSDKVersionOverride()) >+ return *applicationSDKVersionOverride(); >+ return dyld_get_program_sdk_version(); >+} >+ > bool isInWebProcess() > { > static bool mainBundleIsWebProcess = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.WebKit.WebContent.Development"] >@@ -254,6 +273,12 @@ bool IOSApplication::isNike() > return isNike; > } > >+bool IOSApplication::isMoviStarPlus() >+{ >+ static bool isMoviStarPlus = applicationBundleIsEqualTo("com.prisatv.yomvi"_s); >+ return isMoviStarPlus; >+} >+ > #endif > > } // namespace WebCore >Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 234441) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,28 @@ >+2018-07-31 Daniel Bates <dabates@apple.com> and Alex Christensen <achristensen@webkit.org> >+ >+ REGRESSION (r231107): MoviStar+ launches to a blank black screen >+ https://bugs.webkit.org/show_bug.cgi?id=188139 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add infrastructure to check UIProcess SDK from the WebProcess and NetworkProcess for linked-on-or-after checks. >+ >+ * NetworkProcess/NetworkProcessCreationParameters.cpp: >+ (WebKit::NetworkProcessCreationParameters::encode const): >+ (WebKit::NetworkProcessCreationParameters::decode): >+ * NetworkProcess/NetworkProcessCreationParameters.h: >+ * NetworkProcess/cocoa/NetworkProcessCocoa.mm: >+ (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa): >+ * Shared/WebProcessCreationParameters.cpp: >+ (WebKit::WebProcessCreationParameters::encode const): >+ (WebKit::WebProcessCreationParameters::decode): >+ * Shared/WebProcessCreationParameters.h: >+ * UIProcess/Cocoa/WebProcessPoolCocoa.mm: >+ (WebKit::WebProcessPool::platformInitializeWebProcess): >+ (WebKit::WebProcessPool::platformInitializeNetworkProcess): >+ * WebProcess/cocoa/WebProcessCocoa.mm: >+ (WebKit::WebProcess::platformInitializeWebProcess): >+ > 2018-07-31 John Wilander <wilander@apple.com> > > Resource Load Statistics: Remove partitioned cookies for reduced complexity, lower memory footprint, and ability to support more platforms >Index: Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp (revision 234434) >+++ Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp (working copy) >@@ -69,6 +69,7 @@ void NetworkProcessCreationParameters::e > #if PLATFORM(COCOA) > encoder << parentProcessName; > encoder << uiProcessBundleIdentifier; >+ encoder << uiProcessSDKVersion; > encoder << sourceApplicationBundleIdentifier; > encoder << sourceApplicationSecondaryIdentifier; > #if PLATFORM(IOS) >@@ -184,6 +185,8 @@ bool NetworkProcessCreationParameters::d > return false; > if (!decoder.decode(result.uiProcessBundleIdentifier)) > return false; >+ if (!decoder.decode(result.uiProcessSDKVersion)) >+ return false; > if (!decoder.decode(result.sourceApplicationBundleIdentifier)) > return false; > if (!decoder.decode(result.sourceApplicationSecondaryIdentifier)) >Index: Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h (revision 234434) >+++ Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h (working copy) >@@ -82,6 +82,7 @@ struct NetworkProcessCreationParameters > #if PLATFORM(COCOA) > String parentProcessName; > String uiProcessBundleIdentifier; >+ uint32_t uiProcessSDKVersion; > String sourceApplicationBundleIdentifier; > String sourceApplicationSecondaryIdentifier; > #if PLATFORM(IOS) >Index: Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm >=================================================================== >--- Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm (revision 234434) >+++ Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm (working copy) >@@ -74,6 +74,7 @@ static void initializeNetworkSettings() > void NetworkProcess::platformInitializeNetworkProcessCocoa(const NetworkProcessCreationParameters& parameters) > { > WebCore::setApplicationBundleIdentifier(parameters.uiProcessBundleIdentifier); >+ WebCore::setApplicationSDKVersion(parameters.uiProcessSDKVersion); > > #if PLATFORM(IOS) > SandboxExtension::consumePermanently(parameters.cookieStorageDirectoryExtensionHandle); >Index: Source/WebKit/Shared/WebProcessCreationParameters.cpp >=================================================================== >--- Source/WebKit/Shared/WebProcessCreationParameters.cpp (revision 234434) >+++ Source/WebKit/Shared/WebProcessCreationParameters.cpp (working copy) >@@ -103,6 +103,7 @@ void WebProcessCreationParameters::encod > encoder << defaultRequestTimeoutInterval; > #if PLATFORM(COCOA) > encoder << uiProcessBundleIdentifier; >+ encoder << uiProcessSDKVersion; > #endif > encoder << presentingApplicationPID; > #if PLATFORM(COCOA) >@@ -319,6 +320,8 @@ bool WebProcessCreationParameters::decod > #if PLATFORM(COCOA) > if (!decoder.decode(parameters.uiProcessBundleIdentifier)) > return false; >+ if (!decoder.decode(parameters.uiProcessSDKVersion)) >+ return false; > #endif > if (!decoder.decode(parameters.presentingApplicationPID)) > return false; >Index: Source/WebKit/Shared/WebProcessCreationParameters.h >=================================================================== >--- Source/WebKit/Shared/WebProcessCreationParameters.h (revision 234434) >+++ Source/WebKit/Shared/WebProcessCreationParameters.h (working copy) >@@ -146,6 +146,7 @@ struct WebProcessCreationParameters { > > #if PLATFORM(COCOA) > String uiProcessBundleIdentifier; >+ uint32_t uiProcessSDKVersion; > #endif > > ProcessID presentingApplicationPID { 0 }; >Index: Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm >=================================================================== >--- Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (revision 234434) >+++ Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (working copy) >@@ -52,6 +52,7 @@ > #import <pal/spi/cocoa/NSKeyedArchiverSPI.h> > #import <sys/param.h> > #import <wtf/ProcessPrivilege.h> >+#import <wtf/spi/darwin/dyldSPI.h> > > #if PLATFORM(IOS) > #import "WebMemoryPressureHandlerIOS.h" >@@ -205,6 +206,7 @@ void WebProcessPool::platformInitializeW > SandboxExtension::createHandleWithoutResolvingPath(parameters.uiProcessBundleResourcePath, SandboxExtension::Type::ReadOnly, parameters.uiProcessBundleResourcePathExtensionHandle); > > parameters.uiProcessBundleIdentifier = String([[NSBundle mainBundle] bundleIdentifier]); >+ parameters.uiProcessSDKVersion = dyld_get_program_sdk_version(); > > #if PLATFORM(IOS) > if (!m_resolvedPaths.cookieStorageDirectory.isEmpty()) >@@ -291,6 +293,7 @@ void WebProcessPool::platformInitializeN > { > parameters.parentProcessName = [[NSProcessInfo processInfo] processName]; > parameters.uiProcessBundleIdentifier = [[NSBundle mainBundle] bundleIdentifier]; >+ parameters.uiProcessSDKVersion = dyld_get_program_sdk_version(); > > NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; > >Index: Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm >=================================================================== >--- Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (revision 234434) >+++ Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (working copy) >@@ -124,6 +124,8 @@ void WebProcess::platformInitializeWebPr > #endif > > WebCore::setApplicationBundleIdentifier(parameters.uiProcessBundleIdentifier); >+ WebCore::setApplicationSDKVersion(parameters.uiProcessSDKVersion); >+ > SessionTracker::setIdentifierBase(parameters.uiProcessBundleIdentifier); > > #if ENABLE(SANDBOX_EXTENSIONS)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188139
:
346095
|
346104
|
346105
|
346116
|
346119
|
346131
|
346132
|
346141
|
346247
|
346255