Changeset 53921 in webkit


Ignore:
Timestamp:
Jan 27, 2010 4:17:41 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-01-27 Kwang Yul Seo <skyul@company100.net>

Reviewed by Eric Seidel.

[BREWMP] Don't use time function
https://bugs.webkit.org/show_bug.cgi?id=33577

Calling time(0) in BREW devices causes a crash because time
is not properly ported in most devices. Cast currentTime() to
time_t to get the same result as time(0).

  • wtf/DateMath.cpp: (WTF::calculateUTCOffset):
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r53913 r53921  
     12010-01-27  Kwang Yul Seo  <skyul@company100.net>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [BREWMP] Don't use time function
     6        https://bugs.webkit.org/show_bug.cgi?id=33577
     7
     8        Calling time(0) in BREW devices causes a crash because time
     9        is not properly ported in most devices. Cast currentTime() to
     10        time_t to get the same result as time(0).
     11
     12        * wtf/DateMath.cpp:
     13        (WTF::calculateUTCOffset):
     14
    1152010-01-27  Alexey Proskuryakov  <ap@apple.com>
    216
  • trunk/JavaScriptCore/wtf/DateMath.cpp

    r53445 r53921  
    380380static int32_t calculateUTCOffset()
    381381{
     382#if PLATFORM(BREWMP)
     383    time_t localTime = static_cast<time_t>(currentTime());
     384#else
    382385    time_t localTime = time(0);
     386#endif
    383387    tm localt;
    384388    getLocalTime(&localTime, &localt);
Note: See TracChangeset for help on using the changeset viewer.