Date creation should share a little code
Created attachment 263705 [details] Patch
Comment on attachment 263705 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=263705&action=review r=me > Source/JavaScriptCore/runtime/DateConstructor.cpp:138 > + GregorianDateTime t; nit: Maybe we can name this something better than "t" since you're refactoring?
Comment on attachment 263705 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=263705&action=review r=me > Source/JavaScriptCore/runtime/DateConstructor.cpp:115 > +static double milliseconds(ExecState* exec, const ArgList& args, WTF::TimeType timeType) Non-zero benefit to renaming this method to avoid clashes with std::chrono. In particular, when I first read your patch, I happened to read it in reverse and so I thought that the call to milliseconds() was a chrono thing. >> Source/JavaScriptCore/runtime/DateConstructor.cpp:138 >> + GregorianDateTime t; > > nit: Maybe we can name this something better than "t" since you're refactoring? This is a fun one. I would have chosen "t" since it's the universally accepted variable for time. I don't care either way, though.
> > Source/JavaScriptCore/runtime/DateConstructor.cpp:115 > > +static double milliseconds(ExecState* exec, const ArgList& args, WTF::TimeType timeType) > > Non-zero benefit to renaming this method to avoid clashes with std::chromo. => millisecondsFromComponents
Committed r191393: <http://trac.webkit.org/changeset/191393>