Stop using CallNonGenericMethod for Date methods
Categories
(Core :: JavaScript: Standard Library, enhancement, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox81 | --- | fixed |
People
(Reporter: evilpies, Assigned: evilpies)
References
(Blocks 2 open bugs)
Details
Attachments
(7 files)
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review |
Similar to Bug 1651445 we should stop using CallNonGenericMethod here as well.
Compared to the Number functions this a bit more hairy, because we can't just operate on a double.
I think this is still fine, because all uses of the unwrapped Date object are extremely simple and only read/write slots on the NativeObject. We do have unwrapped object roots on the stack across gc-able calls, but from my understanding that is not actually a problem.
I consistently used unwrapped instead of dateObj or something similar to call attention to this potential footgun.
This review isn't urgent, I am going to be away.
| Assignee | ||
Comment 1•5 years ago
|
||
Depends on D82785
Updated•5 years ago
|
| Assignee | ||
Comment 2•5 years ago
|
||
Depends on D82994
| Assignee | ||
Comment 3•5 years ago
|
||
Depends on D82995
| Assignee | ||
Comment 4•5 years ago
|
||
The spec says that toGMTString is the same function as toUTCString.
This was already the case Date.prototype.toGMTString == "toUTCString",
but the error message and naming was still wrong.
Depends on D82996
| Assignee | ||
Comment 5•5 years ago
|
||
Depends on D82997
| Assignee | ||
Comment 6•5 years ago
|
||
Depends on D82998
| Assignee | ||
Comment 7•5 years ago
|
||
Depends on D82999
Updated•5 years ago
|
Comment 9•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/18b15d2d5aae
https://hg.mozilla.org/mozilla-central/rev/a649aaf2bb79
https://hg.mozilla.org/mozilla-central/rev/18f9e72363dc
https://hg.mozilla.org/mozilla-central/rev/55492e3dce5c
https://hg.mozilla.org/mozilla-central/rev/9f4d1cf2f576
https://hg.mozilla.org/mozilla-central/rev/d4dbc509ead5
https://hg.mozilla.org/mozilla-central/rev/aa80b7de92df
Description
•