[Webkit-unassigned] [Bug 65839] CodeGenerator*.pm should support Web IDL Constructor attribute

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 8 07:08:53 PDT 2011


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





--- Comment #2 from Dominic Cooney <dominicc at chromium.org>  2011-08-08 07:08:53 PST ---
(From update of attachment 103199)
View in context: https://bugs.webkit.org/attachment.cgi?id=103199&action=review

I love the direction this is going in. Some comments and questions inline.

> Source/WebCore/bindings/scripts/CodeGeneratorV8.pm:1972
> +    if ($dataNode->extendedAttributes->{"CanBeConstructed"} && !$dataNode->extendedAttributes->{"CustomConstructor"} && !$dataNode->extendedAttributes->{"V8CustomConstructor"} && !$dataNode->extendedAttributes->{"Constructor"}) {

We may want to consider Constructor implies CanBeConstructed. I am not sure about what you’ve got here, since the one case—XMLHttpRequest—has CanBeConstructed, Constructor. What’s your thinking here?

> Source/WebCore/bindings/scripts/CodeGeneratorV8.pm:1989
> +    if ($dataNode->extendedAttributes->{"Constructor"}) {

This is a solid start. Should we try doing two or three more constructors to generalize it a bit? (Arguments, for example.)

> Source/WebCore/bindings/scripts/CodeGeneratorV8.pm:1998
> +    ScriptExecutionContext* context = getScriptExecutionContext();

I expect many objects have a "context", eg XMLHttpRequest has ScriptExecutionContext; Node has Document; etc. Maybe we could support different kinds of contexts (hopefully there are only few) with metadata like ConstructorContext=ScriptExecutionContext|Document|etc.

> Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:-1
> -/*

Yay, killing code. I love it.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list