<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>164684</bug_id>
          
          <creation_ts>2016-11-12 11:55:27 -0800</creation_ts>
          <short_desc>USE(APPLE_INTERNAL_SDK) should not be combined with other conditions</short_desc>
          <delta_ts>2017-11-03 08:08:24 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>mitz</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>bdakin</cc>
    
    <cc>fred.wang</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1250692</commentid>
    <comment_count>0</comment_count>
    <who name="">mitz</who>
    <bug_when>2016-11-12 11:55:27 -0800</bug_when>
    <thetext>There are some instances of
    #if USE(APPLE_INTERNAL_SDK) &amp;&amp; …
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).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1250700</commentid>
    <comment_count>1</comment_count>
    <who name="">mitz</who>
    <bug_when>2016-11-12 12:39:49 -0800</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1367921</commentid>
    <comment_count>2</comment_count>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2017-11-03 08:08:24 -0700</bug_when>
    <thetext>(In reply to mitz from comment #0)
&gt; There are some instances of
&gt;     #if USE(APPLE_INTERNAL_SDK) &amp;&amp; …
&gt; in the code base, but this is hardly ever the right thing to do.
&gt; USE(APPLE_INTERNAL_SDK) really only makes sense as the innermost condition,
&gt; and almost always has an #else clause that should not depend on anything
&gt; other than the use of the internal SDK (but should just contain declarations
&gt; 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.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>