Bug 55293 - Web Inspector: protocol: introduce support for parameters' default values.
Summary: Web Inspector: protocol: introduce support for parameters' default values.
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Ilya Tikhonovsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-25 22:41 PST by Ilya Tikhonovsky
Modified: 2014-01-25 15:00 PST (History)
10 users (show)

See Also:


Attachments
[patch] initial version (22.49 KB, patch)
2011-02-25 23:04 PST, Ilya Tikhonovsky
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Tikhonovsky 2011-02-25 22:41:32 PST
Some parameters should be marked as optional with default values:
       Console::evaluate(in String expression, in String objectGroup, in [optional, default=0] number callFrameId, in [optional, default=true] boolean includeCommandLineAPI, out [typeRef=objectRef] Object result);
Comment 1 Ilya Tikhonovsky 2011-02-25 23:04:02 PST
Created attachment 83930 [details]
[patch] initial version
Comment 2 Joseph Pecoraro 2011-02-26 17:31:49 PST
Are default/optional parameters really necessary?
Comment 3 Pavel Feldman 2011-02-26 23:41:01 PST
(In reply to comment #2)
> Are default/optional parameters really necessary?

Yes. Things like column number while setting breakpoint, objectGroup while evaluating expression are optional. We should reflect it in the protocol. Protocol messages are simply maps.

I don't even think all optional parameters should have default values. Like "not providing objectGroup for evaluation" means that user does not want element to be released with any named group, there is no default objectGroup he wants it in.
Comment 4 Yury Semikhatsky 2011-03-21 00:39:46 PDT
Comment on attachment 83930 [details]
[patch] initial version

View in context: https://bugs.webkit.org/attachment.cgi?id=83930&action=review

Clearing r? until we come to agreement on what we want to see in the protocol wrt default parameters.

> LayoutTests/inspector/protocol/Runtime-evaluate.html:8
> +    console.error = function()

Pavel is also overriding console.error in inspector-test.js in one of his changes so that now it prints out to the inspector test results. Please coordinate with him.