WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 58207
Web Inspector: add support for optional output parameters.
https://bugs.webkit.org/show_bug.cgi?id=58207
Summary
Web Inspector: add support for optional output parameters.
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
Details
Formatted Diff
Diff
Patch
(8.17 KB, patch)
2011-04-11 02:51 PDT
,
Pavel Feldman
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Pavel Feldman
Comment 1
2011-04-10 12:05:00 PDT
Created
attachment 88956
[details]
Patch
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
Created
attachment 88980
[details]
Patch
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.
Top of Page
Format For Printing
XML
Clone This Bug