WebKit Bugzilla
Attachment 356357 Details for
Bug 192299
: [Cocoa] Streamline sandbox code a tiny bit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192299-20181202232622.patch (text/plain), 1.85 KB, created by
Darin Adler
on 2018-12-02 23:26:22 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Darin Adler
Created:
2018-12-02 23:26:22 PST
Size:
1.85 KB
patch
obsolete
>Subversion Revision: 238791 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 6ac3e62f45e1b16b97b4059a65e36e529a7bf6a0..1160a8dbea297a3e2dca16c0a6b6955af4baf25d 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,17 @@ >+2018-12-02 Darin Adler <darin@apple.com> >+ >+ [Cocoa] Streamline sandbox code a tiny bit >+ https://bugs.webkit.org/show_bug.cgi?id=192299 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Shared/mac/SandboxUtilities.mm: >+ (WebKit::processHasContainer): Removed separate function, just use the >+ pathForProcessContainer instead of repeating logic. This costs a tiny >+ bit of memory allocation overhead the first time this function is called, >+ but in return we can eliminate a second copy of the code to call >+ sandbox_container_path_for_pid. >+ > 2018-12-02 Zalan Bujtas <zalan@apple.com> > > Add a runtime feature flag for LayoutFormattingContext. >diff --git a/Source/WebKit/Shared/mac/SandboxUtilities.mm b/Source/WebKit/Shared/mac/SandboxUtilities.mm >index dc350fb4f25248deee65cba1f23954fb82e730cb..85d54823bb42fecd5d771be5532d39d37e9a2c1d 100644 >--- a/Source/WebKit/Shared/mac/SandboxUtilities.mm >+++ b/Source/WebKit/Shared/mac/SandboxUtilities.mm >@@ -47,23 +47,9 @@ bool connectedProcessIsSandboxed(xpc_connection_t connectionToParent) > return sandbox_check_by_audit_token(token, nullptr, SANDBOX_FILTER_NONE); > } > >-static bool processHasContainer(pid_t pid) >-{ >- std::array<char, MAXPATHLEN> path; >- >- if (sandbox_container_path_for_pid(pid, path.data(), path.size())) >- return false; >- >- if (!path[0]) >- return false; >- >- return true; >-} >- > bool processHasContainer() > { >- static bool hasContainer = processHasContainer(getpid()); >- >+ static bool hasContainer = !pathForProcessContainer().isEmpty(); > return hasContainer; > } >
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 192299
: 356357