Bug 30833

Summary: Chromium builds should not use JavaScriptCore/wtf/CurrentTime.cpp
Product: WebKit Reporter: James Robinson <jamesr>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: fishd, mbelshe
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
Patch that excludes wtf/CurrentTime.cpp from the Chromium build fishd: review+, fishd: commit-queue+

James Robinson
Reported 2009-10-27 13:55:55 PDT
Chromium uses a different method to calculate the current time than is used in JavaScriptCore/wtf/CurrentTime.cpp. This can lead to time skew when calls to currentTime() and Chromium's time function are mixed. In particular, timers can get scheduled in the past which leads to 100% CPU use. See http://code.google.com/p/chromium/issues/detail?id=25892 for an example. Chromium provides its own implementation of WTF::currentTime() which it should always use instead.
Attachments
Patch that excludes wtf/CurrentTime.cpp from the Chromium build (2.00 KB, patch)
2009-10-27 14:15 PDT, James Robinson
fishd: review+
fishd: commit-queue+
James Robinson
Comment 1 2009-10-27 14:15:03 PDT
Created attachment 41985 [details] Patch that excludes wtf/CurrentTime.cpp from the Chromium build Here's a fix - it adds an exclusion for wtf/CurrentTime.cpp in JavaScriptCore.gyp and adds a #error to ensure that the file isn't accidentally linked into a Chromium build.
Darin Fisher (:fishd, Google)
Comment 2 2009-10-27 14:52:26 PDT
Note You need to log in before you can comment on or make changes to this bug.