Bug 150399

Summary: Date creation should share a little code
Product: WebKit Reporter: Geoffrey Garen <ggaren>
Component: New BugsAssignee: Geoffrey Garen <ggaren>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch fpizlo: review+

Geoffrey Garen
Reported 2015-10-21 11:21:25 PDT
Date creation should share a little code
Attachments
Patch (7.97 KB, patch)
2015-10-21 11:25 PDT, Geoffrey Garen
fpizlo: review+
Geoffrey Garen
Comment 1 2015-10-21 11:25:40 PDT
Saam Barati
Comment 2 2015-10-21 11:33:00 PDT
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?
Filip Pizlo
Comment 3 2015-10-21 11:36:24 PDT
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.
Geoffrey Garen
Comment 4 2015-10-21 11:41:13 PDT
> > 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
Geoffrey Garen
Comment 5 2015-10-21 11:42:45 PDT
Note You need to log in before you can comment on or make changes to this bug.