[webkit-reviews] review granted: [Bug 136839] Generate Element casting helper functions : [Attachment 238345] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Sep 21 12:53:55 PDT 2014


Darin Adler <darin at apple.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 136839: Generate Element casting helper functions
https://bugs.webkit.org/show_bug.cgi?id=136839

Attachment 238345: Patch
https://bugs.webkit.org/attachment.cgi?id=238345&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=238345&action=review


Looks like a step in the right direction. But one last thing: For me it’s
unpleasant to see so many new call sites using the non-word “impl”. I don’t
really think of the thing that’s wrapped by a wrapper as an “impl” even though
we make some use of that name today. I think we should consider the function
name unwrap() or even toWrapped() instead of toImpl().

> Source/WebCore/bindings/js/JSDOMFormDataCustom.cpp:55
>      HTMLFormElement* form = 0;
>      if (exec->argumentCount() > 0)
> -	   form = toHTMLFormElement(exec->argument(0));
> +	   form = toHTMLFormElementOrNull(exec->argument(0));

If there are no arguments, exec->argument(0) will return undefined and we would
get null from toHTMLFormElementOrNull so we don’t really need the if statement.
Also should use nullptr.


More information about the webkit-reviews mailing list