Bug 46355

Summary: Fix usage of enum as if it was a define
Product: WebKit Reporter: Lucas De Marchi <lucas.de.marchi>
Component: JavaScriptCoreAssignee: Lucas De Marchi <lucas.de.marchi>
Status: RESOLVED FIXED    
Severity: Normal CC: barbieri, commit-queue, darin, kenneth, ossy, tonikitoo, zoltan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Patch
none
Patch none

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.