Bug 46355 - Fix usage of enum as if it was a define
Summary: Fix usage of enum as if it was a define
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Lucas De Marchi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-23 08:22 PDT by Lucas De Marchi
Modified: 2010-09-23 15:46 PDT (History)
7 users (show)

See Also:


Attachments
Patch (1.57 KB, patch)
2010-09-23 08:29 PDT, Lucas De Marchi
no flags Details | Formatted Diff | Diff
Patch (1.85 KB, patch)
2010-09-23 12:06 PDT, Lucas De Marchi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas De Marchi 2010-09-23 08:22:02 PDT
Fix usage of enum as if it was a define
Comment 1 Lucas De Marchi 2010-09-23 08:29:04 PDT
Created attachment 68522 [details]
Patch
Comment 2 Csaba Osztrogonác 2010-09-23 10:08:51 PDT
Here is a related bug: https://bugs.webkit.org/show_bug.cgi?id=45246

Zoltan, Darin, could you check it?
Comment 3 Darin Adler 2010-09-23 11:41:09 PDT
Comment on attachment 68522 [details]
Patch

I am not sure we need two code paths here. The person who originally made this patch was trying to preserve the faster simpler code path for platforms like Mac OS X where the default for a mutex is a normal mutex, but I think we can take the extra hit of always calling pthread_mutexattr_init on all platforms. So lets just get rid of the #if and keep only the #else part.

Unless someone has evidence that the code is too slow when written that way.
Comment 4 Lucas De Marchi 2010-09-23 11:53:05 PDT
(In reply to comment #3)
> (From update of attachment 68522 [details])
> I am not sure we need two code paths here. The person who originally made this patch was trying to preserve the faster simpler code path for platforms like Mac OS X where the default for a mutex is a normal mutex, but I think we can take the extra hit of always calling pthread_mutexattr_init on all platforms. So lets just get rid of the #if and keep only the #else part.
> 
> Unless someone has evidence that the code is too slow when written that way.

Humn... Yes, I agree. I'll upload a new patch soon.
Comment 5 Lucas De Marchi 2010-09-23 12:06:32 PDT
Created attachment 68559 [details]
Patch
Comment 6 WebKit Commit Bot 2010-09-23 15:46:17 PDT
Comment on attachment 68559 [details]
Patch

Clearing flags on attachment: 68559

Committed r68209: <http://trac.webkit.org/changeset/68209>
Comment 7 WebKit Commit Bot 2010-09-23 15:46:23 PDT
All reviewed patches have been landed.  Closing bug.