Bug 58207

Summary: Web Inspector: add support for optional output parameters.
Product: WebKit Reporter: Pavel Feldman <pfeldman>
Component: Web Inspector (Deprecated)Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch none

Pavel Feldman
Reported 2011-04-10 11:56:48 PDT
Output parameters such as "redirectResponse" are optional, but do not allow specifying them as such.
Attachments
Patch (8.62 KB, patch)
2011-04-10 12:05 PDT, Pavel Feldman
no flags
Patch (8.17 KB, patch)
2011-04-11 02:51 PDT, Pavel Feldman
no flags
Pavel Feldman
Comment 1 2011-04-10 12:05:00 PDT
Ilya Tikhonovsky
Comment 2 2011-04-10 13:16:01 PDT
Comment on attachment 88956 [details] Patch 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.
Pavel Feldman
Comment 3 2011-04-11 02:51:46 PDT
Ilya Tikhonovsky
Comment 4 2011-04-11 04:28:07 PDT
Comment on attachment 88980 [details] Patch lgtm
Pavel Feldman
Comment 5 2011-04-11 05:31:09 PDT
Comment on attachment 88980 [details] Patch Clearing flags on attachment: 88980 Committed r83435: <http://trac.webkit.org/changeset/83435>
Pavel Feldman
Comment 6 2011-04-11 05:31:19 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.