WebKit Bugzilla
Attachment 339274 Details for
Bug 185175
: Get the WebKit.framework bundle by asking for WKWebView
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-185175-20180501215247.patch (text/plain), 5.76 KB, created by
Jer Noble
on 2018-05-01 21:52:48 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Jer Noble
Created:
2018-05-01 21:52:48 PDT
Size:
5.76 KB
patch
obsolete
>Subversion Revision: 231222 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 5854d6db9669d574ed21d9d1612cd72dc51e2587..3cad14364fbb11c0d306fc14edcfc941cd138e9a 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,17 @@ >+2018-05-01 Jer Noble <jer.noble@apple.com> >+ >+ Get the WebKit.framework bundle by asking for WKWebView >+ https://bugs.webkit.org/show_bug.cgi?id=185175 >+ >+ Reviewed by Tim Horton. >+ >+ * NetworkProcess/mac/NetworkProcessMac.mm: >+ (WebKit::NetworkProcess::initializeSandbox): >+ * Shared/mac/ChildProcessMac.mm: >+ (WebKit::ChildProcess::initializeSandbox): >+ * StorageProcess/mac/StorageProcessMac.mm: >+ (WebKit::StorageProcess::initializeSandbox): >+ > 2018-05-01 Jer Noble <jer.noble@apple.com> > > Production build error in Migrate Header phase when WK_ALTERNATE_FRAMEWORKS_DIR is set to non-empty value >diff --git a/Source/WebKit/NetworkProcess/mac/NetworkProcessMac.mm b/Source/WebKit/NetworkProcess/mac/NetworkProcessMac.mm >index 54ab302f7eff777efc5ee93a8dc52e5c44784adf..b99fa521054a64e973b6105f44b50b44a29145df 100644 >--- a/Source/WebKit/NetworkProcess/mac/NetworkProcessMac.mm >+++ b/Source/WebKit/NetworkProcess/mac/NetworkProcessMac.mm >@@ -36,6 +36,7 @@ > #import "SandboxInitializationParameters.h" > #import "SecItemShim.h" > #import "StringUtilities.h" >+#import "WKFoundation.h" > #import <WebCore/CertificateInfo.h> > #import <WebCore/FileSystem.h> > #import <WebCore/LocalizedStrings.h> >@@ -119,8 +120,13 @@ void NetworkProcess::allowSpecificHTTPSCertificateForHost(const CertificateInfo& > void NetworkProcess::initializeSandbox(const ChildProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) > { > // Need to overide the default, because service has a different bundle ID. >- NSBundle *webkit2Bundle = [NSBundle bundleForClass:NSClassFromString(@"WKView")]; >- sandboxParameters.setOverrideSandboxProfilePath([webkit2Bundle pathForResource:@"com.apple.WebKit.NetworkProcess" ofType:@"sb"]); >+#if WK_API_ENABLED >+ NSBundle *webKit2Bundle = [NSBundle bundleForClass:NSClassFromString(@"WKWebView")]; >+#else >+ NSBundle *webKit2Bundle = [NSBundle bundleForClass:NSClassFromString(@"WKView")]; >+#endif >+ >+ sandboxParameters.setOverrideSandboxProfilePath([webKit2Bundle pathForResource:@"com.apple.WebKit.NetworkProcess" ofType:@"sb"]); > > ChildProcess::initializeSandbox(parameters, sandboxParameters); > } >diff --git a/Source/WebKit/Shared/mac/ChildProcessMac.mm b/Source/WebKit/Shared/mac/ChildProcessMac.mm >index 0013c1079cf021ffe74f1f6a79e61efc6f35427c..aed5b9fd70960fe170d5026cc20e267a516f0204 100644 >--- a/Source/WebKit/Shared/mac/ChildProcessMac.mm >+++ b/Source/WebKit/Shared/mac/ChildProcessMac.mm >@@ -31,6 +31,7 @@ > #import "CodeSigning.h" > #import "QuarantineSPI.h" > #import "SandboxInitializationParameters.h" >+#import "WKFoundation.h" > #import "XPCServiceEntryPoint.h" > #import <WebCore/FileSystem.h> > #import <WebCore/SystemVersion.h> >@@ -111,8 +112,12 @@ static OSStatus enableSandboxStyleFileQuarantine() > > void ChildProcess::initializeSandbox(const ChildProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) > { >- NSBundle *webkit2Bundle = [NSBundle bundleForClass:NSClassFromString(@"WKView")]; >- String defaultProfilePath = [webkit2Bundle pathForResource:[[NSBundle mainBundle] bundleIdentifier] ofType:@"sb"]; >+#if WK_API_ENABLED >+ NSBundle *webKit2Bundle = [NSBundle bundleForClass:NSClassFromString(@"WKWebView")]; >+#else >+ NSBundle *webKit2Bundle = [NSBundle bundleForClass:NSClassFromString(@"WKView")]; >+#endif >+ String defaultProfilePath = [webKit2Bundle pathForResource:[[NSBundle mainBundle] bundleIdentifier] ofType:@"sb"]; > > if (sandboxParameters.userDirectorySuffix().isNull()) { > auto userDirectorySuffix = parameters.extraInitializationData.find("user-directory-suffix"); >@@ -146,7 +151,7 @@ void ChildProcess::initializeSandbox(const ChildProcessInitializationParameters& > } > setenv("TMPDIR", temporaryDirectory, 1); > >- sandboxParameters.addPathParameter("WEBKIT2_FRAMEWORK_DIR", [[webkit2Bundle bundlePath] stringByDeletingLastPathComponent]); >+ sandboxParameters.addPathParameter("WEBKIT2_FRAMEWORK_DIR", [[webKit2Bundle bundlePath] stringByDeletingLastPathComponent]); > sandboxParameters.addConfDirectoryParameter("DARWIN_USER_TEMP_DIR", _CS_DARWIN_USER_TEMP_DIR); > sandboxParameters.addConfDirectoryParameter("DARWIN_USER_CACHE_DIR", _CS_DARWIN_USER_CACHE_DIR); > >diff --git a/Source/WebKit/StorageProcess/mac/StorageProcessMac.mm b/Source/WebKit/StorageProcess/mac/StorageProcessMac.mm >index b4132935ace67b19d021909745773102cb9582a2..3c0293b184b786ef98f040a9090e73151e870c53 100644 >--- a/Source/WebKit/StorageProcess/mac/StorageProcessMac.mm >+++ b/Source/WebKit/StorageProcess/mac/StorageProcessMac.mm >@@ -53,8 +53,12 @@ void StorageProcess::initializeProcessName(const ChildProcessInitializationParam > void StorageProcess::initializeSandbox(const ChildProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) > { > // Need to overide the default, because service has a different bundle ID. >- NSBundle *webkit2Bundle = [NSBundle bundleForClass:NSClassFromString(@"WKView")]; >- sandboxParameters.setOverrideSandboxProfilePath([webkit2Bundle pathForResource:@"com.apple.WebKit.Storage" ofType:@"sb"]); >+#if WK_API_ENABLED >+ NSBundle *webKit2Bundle = [NSBundle bundleForClass:NSClassFromString(@"WKWebView")]; >+#else >+ NSBundle *webKit2Bundle = [NSBundle bundleForClass:NSClassFromString(@"WKView")]; >+#endif >+ sandboxParameters.setOverrideSandboxProfilePath([webKit2Bundle pathForResource:@"com.apple.WebKit.Storage" ofType:@"sb"]); > > ChildProcess::initializeSandbox(parameters, sandboxParameters); > }
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 185175
:
339243
|
339246
|
339249
|
339270
|
339274
|
339302