<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Refactoring HTMLMediaElement getStartDate() implementation"
href="https://bugs.webkit.org/show_bug.cgi?id=152181#c16">Comment # 16</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Refactoring HTMLMediaElement getStartDate() implementation"
href="https://bugs.webkit.org/show_bug.cgi?id=152181">bug 152181</a>
from <span class="vcard"><a class="email" href="mailto:darin@apple.com" title="Darin Adler <darin@apple.com>"> <span class="fn">Darin Adler</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=270113&action=diff" name="attach_270113" title="Make sure HTMLMediaElement getStartDate() always returns a valid Date object">attachment 270113</a> <a href="attachment.cgi?id=270113&action=edit" title="Make sure HTMLMediaElement getStartDate() always returns a valid Date object">[details]</a></span>
Make sure HTMLMediaElement getStartDate() always returns a valid Date object
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=270113&action=review">https://bugs.webkit.org/attachment.cgi?id=270113&action=review</a>
This doesn’t seem right. Is it really acceptable to create a date object with the value NaN?
Why no new test case? What’s the point of making this change if it doesn’t fix a bug?
<span class="quote">> Source/WebCore/bindings/js/JSDOMBinding.cpp:120
> +JSValue jsDate(ExecState* exec, double value)
> +{
> + return DateInstance::create(exec->vm(), exec->lexicalGlobalObject()->dateStructure(), value);
> +}</span >
What does this function do if it’s passed null or infinity? Is it legal to create a date instance with such values? Is it a programming error to call this? If so, then should something ASSERT(std::isfinite(value))? Maybe DateInstance::create already does that?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>