RESOLVED FIXED151981
Create a Sandbox SPI header
https://bugs.webkit.org/show_bug.cgi?id=151981
Summary Create a Sandbox SPI header
Joseph Pecoraro
Reported 2015-12-07 21:29:23 PST
Create a Sandbox SPI header. There are multiple redeclaration of Sandbox SPIs across multiple files.
Attachments
[PATCH] Proposed Fix (11.76 KB, patch)
2015-12-07 21:32 PST, Joseph Pecoraro
aestes: review+
[PATCH] For Landing (11.70 KB, patch)
2015-12-08 13:15 PST, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 2015-12-07 21:32:40 PST
Created attachment 266843 [details] [PATCH] Proposed Fix
Andy Estes
Comment 2 2015-12-07 21:49:44 PST
Comment on attachment 266843 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=266843&action=review > Source/WTF/wtf/spi/darwin/SandboxSPI.h:32 > +// We have to #undef __APPLE_API_PRIVATE to prevent sandbox.h from looking for a header file that does not exist (<rdar://problem/9679211>). > +#undef __APPLE_API_PRIVATE This issue looks resolved. Can we remove the undef? > Source/WTF/wtf/spi/darwin/SandboxSPI.h:36 > +#if defined(__has_include) && __has_include(<sandbox/private.h>) > +#import <sandbox/private.h> Instead of checking if sandbox/private.h exists, you should unconditionally include it if USE(APPLE_INTERNAL_SDK) is true. We want to generate a compiler error if this header unexpectedly goes missing from internal SDKs. > Source/WTF/wtf/spi/darwin/SandboxSPI.h:48 > +EXTERN_C const enum sandbox_filter_type SANDBOX_CHECK_NO_REPORT; > +EXTERN_C int sandbox_check(pid_t, const char *operation, enum sandbox_filter_type, ...); > +EXTERN_C int sandbox_container_path_for_pid(pid_t, char *buffer, size_t bufsize); > +EXTERN_C int sandbox_init_with_parameters(const char *profile, uint64_t flags, const char *const parameters[], char **errorbuf); You should declare these functions outside of the USE(APPLE_INTERNAL_SDK) block. This lets us detect in internal builds if the function signatures change in the SDK.
Joseph Pecoraro
Comment 3 2015-12-08 13:15:16 PST
Created attachment 266931 [details] [PATCH] For Landing Patch for landing, checking on the bots first.
Joseph Pecoraro
Comment 4 2015-12-08 13:50:40 PST
Note You need to log in before you can comment on or make changes to this bug.