WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
164684
USE(APPLE_INTERNAL_SDK) should not be combined with other conditions
https://bugs.webkit.org/show_bug.cgi?id=164684
Summary
USE(APPLE_INTERNAL_SDK) should not be combined with other conditions
mitz
Reported
2016-11-12 11:55:27 PST
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
Comment 1
2016-11-12 12:39:49 PST
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)
Comment 2
2017-11-03 08:08:24 PDT
(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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug