Ignore:
Timestamp:
Oct 27, 2009, 4:29:40 PM (16 years ago)
Author:
[email protected]
Message:

JavaScriptCore: A little bit of refactoring in the date code.

Patch by Geoffrey Garen <[email protected]> on 2009-10-27
Reviewed by Sam Weinig.

  • runtime/DateConstructor.cpp:

(JSC::constructDate):

  • runtime/DateInstance.cpp:

(JSC::DateInstance::DateInstance):

  • runtime/DateInstance.h: Removed some unused functions. Changed the default

constructor to ensure that a DateInstance is always initialized.

  • runtime/DatePrototype.cpp:

(JSC::DatePrototype::DatePrototype): Pass an initializer to our constructor,
since it now requires one.

  • wtf/DateMath.cpp:

(WTF::msToGregorianDateTime): Only compute our offset from UTC if our
output will require it. Otherwise, our offset is 0.

WebKit/mac: Updated for refactoring in the date code.

Patch by Geoffrey Garen <[email protected]> on 2009-10-27
Reviewed by Sam Weinig.

  • WebView/WebView.mm:

(aeDescFromJSValue): Since we just want a number of milliseconds, do that
instead of something more complicated.

File:
1 edited

Legend:

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

    r48836 r50183  
    113113    }
    114114
    115     DateInstance* result = new (exec) DateInstance(exec->lexicalGlobalObject()->dateStructure());
    116     result->setInternalValue(jsNumber(exec, timeClip(value)));
    117     return result;
     115    return new (exec) DateInstance(exec, value);
    118116}
    119117   
Note: See TracChangeset for help on using the changeset viewer.