Bug 34380 - [WINCE] Buildfix for ThreadSpecific.h
Summary: [WINCE] Buildfix for ThreadSpecific.h
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Other
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-30 14:38 PST by Patrick R. Gansterer
Modified: 2010-01-31 20:23 PST (History)
1 user (show)

See Also:


Attachments
The patch (1.73 KB, patch)
2010-01-30 14:38 PST, Patrick R. Gansterer
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick R. Gansterer 2010-01-30 14:38:11 PST
see patch
Comment 1 Patrick R. Gansterer 2010-01-30 14:38:58 PST
Created attachment 47776 [details]
The patch
Comment 2 Darin Adler 2010-01-31 19:47:36 PST
Comment on attachment 47776 [details]
The patch

> +// TLS_OUT_OF_INDEXES is not defined on WinCE.
> +#ifndef TLS_OUT_OF_INDEXES
> +#define TLS_OUT_OF_INDEXES 0xffffffff
> +#endif

I guess this is OK, but I don't see any check for WinCE here. Might be slightly better to explicitly use a WINCE ifdef so we’d get a warning instead of just using the wrong value if someone made a mistake and did not get the TLS_OUT_OF_INDEXES constant.

> -    DWORD tls_key = TlsAlloc();
> -    if (tls_key == TLS_OUT_OF_INDEXES)
> +    DWORD tlsKey = TlsAlloc();
> +    if (tlsKey == TLS_OUT_OF_INDEXES)
>          CRASH();
>  
>      m_index = InterlockedIncrement(&tlsKeyCount()) - 1;
>      if (m_index >= kMaxTlsKeySize)
>          CRASH();
> -    tlsKeys()[m_index] = tls_key;
> +    tlsKeys()[m_index] = tlsKey;

The unrelated style change really does not belong on the same patch.
Comment 3 WebKit Commit Bot 2010-01-31 20:23:11 PST
Comment on attachment 47776 [details]
The patch

Clearing flags on attachment: 47776

Committed r54123: <http://trac.webkit.org/changeset/54123>
Comment 4 WebKit Commit Bot 2010-01-31 20:23:16 PST
All reviewed patches have been landed.  Closing bug.