Bug 74246 - #ifdef the parts of Mac platform which should not be used on iOS
Summary: #ifdef the parts of Mac platform which should not be used on iOS
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-10 15:56 PST by Benjamin Poulain
Modified: 2011-12-10 22:20 PST (History)
2 users (show)

See Also:


Attachments
Patch (11.06 KB, patch)
2011-12-10 16:21 PST, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Patch (8.78 KB, patch)
2011-12-10 20:40 PST, Benjamin Poulain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2011-12-10 15:56:10 PST
#ifdef some functions of the Mac platform
Comment 1 Benjamin Poulain 2011-12-10 16:21:54 PST
Created attachment 118696 [details]
Patch
Comment 2 David Kilzer (:ddkilzer) 2011-12-10 20:08:17 PST
Comment on attachment 118696 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=118696&action=review

I don't think we should merge the WebThread ASSERT() changes yet.  Also, the BUILDING_ON_<BIG_CAT> macros shouldn't be defined on iOS, so that change shouldn't be necessary.

> Source/WebCore/platform/mac/EmptyProtocolDefinitions.h:40
> +#if (defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)) && !PLATFORM(IOS)

Is this change necessary?  BUILDING_ON_LEOPARD and BUILDING_ON_SNOW_LEOPARD should never be defined when building iOS.

> Source/WebCore/platform/mac/Language.mm:51
> +#if !PLATFORM(IOS)
>      ASSERT(isMainThread());
> +#else
> +    ASSERT(isMainThread() || pthread_main_np());
> +#endif

This change is related to the WebThread on iOS.

> Source/WebCore/platform/mac/Language.mm:69
> +#if !PLATFORM(IOS)
>      ASSERT(isMainThread());
> +#else
> +    ASSERT(isMainThread() || pthread_main_np());
> +#endif

Ditto.

> Source/WebCore/platform/mac/Language.mm:102
> +#if !PLATFORM(IOS)
>      ASSERT(isMainThread());
> +#else
> +    ASSERT(isMainThread() || pthread_main_np());
> +#endif

Ditto.

> Source/WebCore/platform/mac/LocalizedStringsMac.mm:42
> +    // Can be called on a dispatch queue when initializing strings on iOS
> +    // See LoadWebLocalizedStrings and <rdar://problem/7902473>.

First comment needs a period at the end of the sentence.

> Source/WebCore/platform/mac/SharedBufferMac.mm:57
> +#if !PLATFORM(IOS)
>      JSC::initializeThreading();
>  #if PLATFORM(QT) && USE(QTKIT)
>      WTF::initializeMainThread();
>  #else
>      WTF::initializeMainThreadToProcessMainThread();
>  #endif
> +#endif // !PLATFORM(IOS)

This change is related to the WebThread on iOS.
Comment 3 Benjamin Poulain 2011-12-10 20:40:08 PST
Created attachment 118703 [details]
Patch
Comment 4 David Kilzer (:ddkilzer) 2011-12-10 20:57:57 PST
Comment on attachment 118703 [details]
Patch

r=me
Comment 5 WebKit Review Bot 2011-12-10 22:20:47 PST
Comment on attachment 118703 [details]
Patch

Clearing flags on attachment: 118703

Committed r102535: <http://trac.webkit.org/changeset/102535>
Comment 6 WebKit Review Bot 2011-12-10 22:20:52 PST
All reviewed patches have been landed.  Closing bug.