Closed
Bug 781154
Opened 12 years ago
Closed 11 years ago
JS_ObjectIsDate returns false for Date objects created in a script.
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: raphc, Unassigned)
Details
(Whiteboard: [fixed by bug 856833])
Attachments
(3 files)
23.88 KB,
patch
|
Details | Diff | Splinter Review | |
6.33 KB,
patch
|
Details | Diff | Splinter Review | |
24.84 KB,
patch
|
Details | Diff | Splinter Review |
No description provided.
Reporter | ||
Updated•12 years ago
|
Summary: JS_ObjectIsDate returns false for Date objs → JS_ObjectIsDate returns false for Date objects created in a script.
Comment 1•12 years ago
|
||
Test case?
Comment 2•12 years ago
|
||
Raphael, maybe you could attach a patch that adds the usage of JS_ObjectIsDate() for .valueAsDate and a test case? We need to have the other patches to land though.
Reporter | ||
Comment 3•12 years ago
|
||
Reporter | ||
Comment 4•12 years ago
|
||
Reporter | ||
Comment 5•12 years ago
|
||
Reporter | ||
Comment 6•12 years ago
|
||
Actually this problem only happens in the web console. I saw this problem when testing the input <type=date> valueAsDate attribute. When you apply these patches (and enable the dom.experimental-forms setting) you should be able to use >input.valueAsDate = new Date(). The mochitests for valueAsDate() are working fine. But if you do the same in a console, it doesn't work, because JS_ObjectIsDate() returns false.
Comment 7•12 years ago
|
||
It's probably failing on the wrapped version.
Reporter | ||
Comment 8•12 years ago
|
||
I saw that the class of this object when created in the console was proxy instead of date. Is that what you call wrapped version? Can that happen somewhere else than in the console? This behavior is disturbing for webdevs who want to use the web console to test code related to valueAsDate, but otherwise not a major issue for the input date implementation itself.
Updated•12 years ago
|
Whiteboard: [js:p3]
Comment 9•11 years ago
|
||
Very likely this bug can't be reproduced in Nightly any more because we use WebIDL bindings for input elements so maybe it could be interesting to have a look before it is no longer reproducible in all versions of Firefox?
Flags: needinfo?(jwalden+bmo)
Comment 10•11 years ago
|
||
I'm not quite sure what's desired here. Having the relevant JS_ObjectIsDate bits via WebIDL should solve this, yes, and when I test in a nightly it does indeed work. (Although I ran across bug 874640 when doing so, and got derailed for a bit on that.) What do you want me to do here, exactly?
Flags: needinfo?(jwalden+bmo)
Comment 11•11 years ago
|
||
(In reply to Jeff Walden [:Waldo] (remove +bmo to email) from comment #10) > I'm not quite sure what's desired here. Having the relevant JS_ObjectIsDate > bits via WebIDL should solve this, yes, and when I test in a nightly it does > indeed work. (Although I ran across bug 874640 when doing so, and got > derailed for a bit on that.) What do you want me to do here, exactly? I was wondering if you could look at this bug to see if it wasn't coming from a more important underlying bug that we might want to fix.
Flags: needinfo?(jwalden+bmo)
Comment 12•11 years ago
|
||
Oh. The underlying issue was all but certainly fixed in http://hg.mozilla.org/mozilla-central/rev/f8a7c4c4874d which would make us good now.
Flags: needinfo?(jwalden+bmo)
Comment 13•11 years ago
|
||
Thanks Waldo :)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [js:p3] → [fixed by bug 856833]
You need to log in
before you can comment on or make changes to this bug.
Description
•