This change allows Chrome on OS X to use the CF functions for currentTime() rather than the POSIX variant.
Created attachment 27882 [details] PLATFORM(CF) Is PLATFORM(CF) OK to use here? A concern has been raised about Apple's CF variant on Windows, if this is a problem, would PLATFORM(DARWIN) && PLATFORM(CF) be a better choice?
(In reply to comment #1) > Is PLATFORM(CF) OK to use here? A concern has been raised about Apple's CF > variant on Windows, if this is a problem, would PLATFORM(DARWIN) && > PLATFORM(CF) be a better choice? We still want Windows to use the WIN_OS code, as it is higher-resolution than CFAbsoluteTimeGetCurrent on Windows. One option would be to do what you proposed: PLATFORM(DARWIN) && PLATFORM(CF). Another option would be to make the WIN_OS code the first branch of the #if/#elif chain. I think I prefer the latter.
Created attachment 27883 [details] Address aroben's comments from previous patch Thanks, I've put the Windows case first and added a comment so the reasoning behind the change isn't lost.
Comment on attachment 27883 [details] Address aroben's comments from previous patch > +#elif PLATFORM(GTK) > + > +// Note: GTK on Windows will pick up the PLATFORM(WIN) implementation above which provides > +// better accuracy compared with Windows implementation of g_get_current_time: > +// (http://www.google.com/codesearch/p?hl=en#HHnNRjks1t0/glib-2.5.2/glib/gmain.c&q=g_get_current_time). > +// Non-Windows GTK builds could use gettimeofday() directly but for the sake of consistency lets use GTK function. Looks like this patch helps out GTK/win, too! r=me
Landed as http://trac.webkit.org/changeset/41149.