Bug 164684
Summary: | USE(APPLE_INTERNAL_SDK) should not be combined with other conditions | ||
---|---|---|---|
Product: | WebKit | Reporter: | mitz |
Component: | WebKit Misc. | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | ap, bdakin, fred.wang, sam |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
mitz
There are some instances of
#if USE(APPLE_INTERNAL_SDK) && …
in the code base, but this is hardly ever the right thing to do. USE(APPLE_INTERNAL_SDK) really only makes sense as the innermost condition, and almost always has an #else clause that should not depend on anything other than the use of the internal SDK (but should just contain declarations that are equivalent to what the SDK provides).
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
mitz
I see that a common pattern is
USE(APPLE_INTERNAL_SDK) || PLATFORM(MAC)
because several APIs are public in macOS but private in iOS and Windows.
Frédéric Wang (:fredw)
(In reply to mitz from comment #0)
> There are some instances of
> #if USE(APPLE_INTERNAL_SDK) && …
> in the code base, but this is hardly ever the right thing to do.
> USE(APPLE_INTERNAL_SDK) really only makes sense as the innermost condition,
> and almost always has an #else clause that should not depend on anything
> other than the use of the internal SDK (but should just contain declarations
> that are equivalent to what the SDK provides).
Also, we should consider moving such #if #else into separate SPI.h headers.
Note: I just rebased and landed the old patch https://trac.webkit.org/changeset/224395 which adds more USE(APPLE_INTERNAL_SDK) to fix here.