Bug 30833 - Chromium builds should not use JavaScriptCore/wtf/CurrentTime.cpp
Summary: Chromium builds should not use JavaScriptCore/wtf/CurrentTime.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-27 13:55 PDT by James Robinson
Modified: 2009-10-27 14:52 PDT (History)
2 users (show)

See Also:


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+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Robinson 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.
Comment 1 James Robinson 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.
Comment 2 Darin Fisher (:fishd, Google) 2009-10-27 14:52:26 PDT
Landed as http://trac.webkit.org/changeset/50173