[Webkit-unassigned] [Bug 152181] Refactoring HTMLMediaElement getStartDate() implementation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 28 08:20:42 PST 2016


https://bugs.webkit.org/show_bug.cgi?id=152181

--- Comment #16 from Darin Adler <darin at apple.com> ---
Comment on attachment 270113
  --> https://bugs.webkit.org/attachment.cgi?id=270113
Make sure HTMLMediaElement getStartDate() always returns a valid Date object

View in context: https://bugs.webkit.org/attachment.cgi?id=270113&action=review

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?

> Source/WebCore/bindings/js/JSDOMBinding.cpp:120
> +JSValue jsDate(ExecState* exec, double value)
> +{
> +    return DateInstance::create(exec->vm(), exec->lexicalGlobalObject()->dateStructure(), value);
> +}

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?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160128/94616e97/attachment.html>


More information about the webkit-unassigned mailing list