[Webkit-unassigned] [Bug 58207] Web Inspector: add support for optional output parameters.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Apr 10 13:16:01 PDT 2011


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





--- Comment #2 from Ilya Tikhonovsky <loislo at chromium.org>  2011-04-10 13:16:01 PST ---
(From update of attachment 88956)
View in context: https://bugs.webkit.org/attachment.cgi?id=88956&action=review

> Source/WebCore/inspector/CodeGeneratorInspector.pm:380
> +        foreach my $parameter (@argsFiltered) {
> +            my $optional = $parameter->extendedAttributes->{"optional"} ? "if (" . $parameter->name . ") " : "";
> +            push(@function, "    " . $optional .  "paramsObject->set" . typeTraits($parameter->type, "JSONType") . "(\"" . $parameter->name . "\", " . $parameter->name . ");");

The generated code doesn't match WebKit style guide.

> Source/WebCore/inspector/CodeGeneratorInspector.pm:487
> +        my $optional = $parameter->extendedAttributes->{"optional"} ? "if (out_" . $parameter->name . ") " : "";
> +        push(@function, "    " . $optional .  "result->set" . typeTraits($parameter->type, "JSONType") . "(\"" . $parameter->name . "\", out_" . $parameter->name . ");");

The code doesn't work well for Array and Object types I'm not sure about strings.
The out arguments for array and object types have default values which are not equal to false.

generated code doesn't match WebKit style guide.

-- 
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