Ignore:
Timestamp:
Jun 8, 2009, 3:37:06 PM (16 years ago)
Author:
Dimitri Glazkov
Message:

JavaScriptCore:

2009-06-08 Dimitri Glazkov <Dimitri Glazkov>

Reviewed by Eric Seidel.

https://bugs.webkit.org/show_bug.cgi?id=26238
Move most of runtime/DateMath functions to wtf/DateMath, and split off conversion-related
helpers to DateConversion.

  • AllInOneFile.cpp: Changed DateMath->DateConversion.
  • GNUmakefile.am: Ditto and added DateMath.
  • JavaScriptCore.exp: Ditto.
  • JavaScriptCore.pri: Ditto.
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
  • JavaScriptCore.vcproj/WTF/WTF.vcproj: Added DateMath.
  • JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
  • JavaScriptCoreSources.bkl: Ditto.
  • pcre/pcre_exec.cpp: Changed to use DateMath.
  • profiler/ProfileNode.cpp: (JSC::getCount): Changed to use DateConversion.
  • runtime/DateConstructor.cpp: Ditto.
  • runtime/DateConversion.cpp: Copied from JavaScriptCore/runtime/DateMath.cpp. (JSC::parseDate): Refactored to use null-terminated characters as input.
  • runtime/DateConversion.h: Copied from JavaScriptCore/runtime/DateMath.h.
  • runtime/DateInstance.cpp: Changed to use wtf/DateMath.
  • runtime/DateInstance.h: Ditto.
  • runtime/DateMath.cpp: Removed.
  • runtime/DateMath.h: Removed.
  • runtime/DatePrototype.cpp: Ditto.
  • runtime/InitializeThreading.cpp: Ditto.
  • wtf/DateMath.cpp: Copied from JavaScriptCore/runtime/DateMath.cpp.
  • wtf/DateMath.h: Copied from JavaScriptCore/runtime/DateMath.h.

WebCore:

2009-06-08 Dimitri Glazkov <Dimitri Glazkov>

Reviewed by Eric Seidel.

https://bugs.webkit.org/show_bug.cgi?id=26238
Add parseDate helper to HTTPParsers, which uses WTF::parseDateFromNullTerminatedCharacters.

  • ForwardingHeaders/runtime/DateMath.h: Removed.
  • ForwardingHeaders/wtf/DateMath.h: Copied from WebCore/ForwardingHeaders/runtime/DateMath.h.
  • platform/network/HTTPParsers.cpp: (WebCore::parseDate): Added.
  • platform/network/HTTPParsers.h:
  • platform/network/ResourceResponseBase.cpp: (WebCore::parseDateValueInHeader): Changed to use the new helper.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/DateInstance.cpp

    r38440 r44508  
    2323#include "DateInstance.h"
    2424
    25 #include "DateMath.h"
    2625#include <math.h>
     26#include <wtf/DateMath.h>
    2727#include <wtf/MathExtras.h>
    2828
     
    5959    if (outputIsUTC) {
    6060        if (m_cache->m_gregorianDateTimeUTCCachedForMS != milli) {
    61             JSC::msToGregorianDateTime(milli, true, m_cache->m_cachedGregorianDateTimeUTC);
     61            WTF::msToGregorianDateTime(milli, true, m_cache->m_cachedGregorianDateTimeUTC);
    6262            m_cache->m_gregorianDateTimeUTCCachedForMS = milli;
    6363        }
     
    6565    } else {
    6666        if (m_cache->m_gregorianDateTimeCachedForMS != milli) {
    67             JSC::msToGregorianDateTime(milli, false, m_cache->m_cachedGregorianDateTime);
     67            WTF::msToGregorianDateTime(milli, false, m_cache->m_cachedGregorianDateTime);
    6868            m_cache->m_gregorianDateTimeCachedForMS = milli;
    6969        }
Note: See TracChangeset for help on using the changeset viewer.