[webkit-reviews] review requested: [Bug 32698] [JSC] Date binding support : [Attachment 45166] Proposed patch (rev.2)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 18 12:02:14 PST 2009


TAMURA, Kent <tkent at chromium.org> has asked  for review:
Bug 32698: [JSC] Date binding support
https://bugs.webkit.org/show_bug.cgi?id=32698

Attachment 45166: Proposed patch (rev.2)
https://bugs.webkit.org/attachment.cgi?id=45166&action=review

------- Additional Comments from TAMURA, Kent <tkent at chromium.org>
* Follow the Darin's comments.

Produced code will be:

JSValue jsHTMLInputElementValueAsDate(ExecState* exec, const Identifier&, const
PropertySlot& slot)
{
    JSHTMLInputElement* castedThis =
static_cast<JSHTMLInputElement*>(asObject(slot.slotBase()));
    UNUSED_PARAM(exec);
    HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThis->impl());

    return jsDateOrNull(exec, imp->valueAsDate());
}


void setJSHTMLInputElementValueAsDate(ExecState* exec, JSObject* thisObject,
JSValue value)
{
    HTMLInputElement* imp =
static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(thisObject)->im
pl());
    ExceptionCode ec = 0;
    imp->setValueAsDate(valueToDateWithUndefinedOrNullCheck(exec, value), ec);
    setDOMException(exec, ec);
}


More information about the webkit-reviews mailing list