[webkit-reviews] review granted: [Bug 71756] CodeGeneratorV8.pm can generate a NamedConstructor : [Attachment 114098] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 8 16:21:41 PST 2011


Adam Barth <abarth at webkit.org> has granted Kentaro Hara
<haraken at chromium.org>'s request for review:
Bug 71756: CodeGeneratorV8.pm can generate a NamedConstructor
https://bugs.webkit.org/show_bug.cgi?id=71756

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

------- Additional Comments from Adam Barth <abarth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=114098&action=review


I feel slightly like we're copying and pasting code in the code generator, but
I think it's ok.

> Source/WebCore/bindings/scripts/CodeGeneratorV8.pm:1659
> +    if (!document)
> +	   return throwError("${implClassName} constructor associated document
is unavailable", V8Proxy::ReferenceError);

This can't occur.

> Source/WebCore/bindings/scripts/CodeGeneratorV8.pm:1711
> +    obj->ref();

Yuck.

> Source/WebCore/bindings/scripts/CodeGeneratorV8.pm:1719
> +    if ($raisesExceptions) {
> +	   push(@implContent, "  fail:\n");
> +	   push(@implContent, "    return throwError(ec);\n");
> +    }

Why do we need goto?  There only seems to be one goto.	It seems like we should
just put this code there.

> Source/WebCore/bindings/scripts/IDLParser.pm:155
> +	       if ($name eq "NamedConstructor") {

These regexps are kind of mysterious to me.


More information about the webkit-reviews mailing list