WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
150399
Date creation should share a little code
https://bugs.webkit.org/show_bug.cgi?id=150399
Summary
Date creation should share a little code
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+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Geoffrey Garen
Comment 1
2015-10-21 11:25:40 PDT
Created
attachment 263705
[details]
Patch
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
Committed
r191393
: <
http://trac.webkit.org/changeset/191393
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug