Bug 64691 - Web Inspector: RuntimeAgent.evaluateOn should not require "return X;" syntax.
Summary: Web Inspector: RuntimeAgent.evaluateOn should not require "return X;" syntax.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Feldman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-18 06:35 PDT by Pavel Feldman
Modified: 2011-07-21 08:49 PDT (History)
11 users (show)

See Also:


Attachments
Patch (12.25 KB, patch)
2011-07-18 09:02 PDT, Pavel Feldman
no flags Details | Formatted Diff | Diff
Patch (21.50 KB, patch)
2011-07-21 08:27 PDT, Pavel Feldman
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2011-07-18 06:35:12 PDT
Client code should look like RuntimeAgent.evaluateOn("X"), not RuntimeAgent.evaluateOn("return X").
Comment 1 Pavel Feldman 2011-07-18 08:37:24 PDT
It turns out that the easiest would be to pass entire function declaration into this method.
Comment 2 Pavel Feldman 2011-07-18 09:02:29 PDT
Created attachment 101164 [details]
Patch
Comment 3 WebKit Review Bot 2011-07-18 09:03:57 PDT
Attachment 101164 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/insp..." exit_code: 1

Source/WebCore/inspector/InjectedScript.cpp:66:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Source/WebCore/inspector/InjectedScript.h:59:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Total errors found: 2 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Pavel Feldman 2011-07-21 08:27:03 PDT
Created attachment 101594 [details]
Patch
Comment 5 WebKit Review Bot 2011-07-21 08:30:32 PDT
Attachment 101594 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/insp..." exit_code: 1

Source/WebCore/inspector/InjectedScript.cpp:66:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Source/WebCore/inspector/InspectorRuntimeAgent.h:57:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Source/WebCore/inspector/InspectorRuntimeAgent.cpp:85:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Source/WebCore/inspector/InjectedScript.h:59:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Total errors found: 4 in 15 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Yury Semikhatsky 2011-07-21 08:40:49 PDT
Comment on attachment 101594 [details]
Patch

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

> LayoutTests/ChangeLog:5
> +

Please provide the change description.

> Source/WebCore/inspector/InjectedScriptSource.js:264
> +            var resolvedArg = this._objectForId(this._parseObjectId(arguments[i]));

You should drop(?) arguments in case they are from other injected scripts.

> Source/WebCore/inspector/Inspector.json:264
> +                    { "name": "arguments", "type": "array", "items": { "type": "objectId", "description": "Identifier of the argument" }, "optional": true, "description": "Call arguments." }

Please describe what happens when the arguments are from different frames.
Comment 7 Pavel Feldman 2011-07-21 08:49:47 PDT
Committed r91472: <http://trac.webkit.org/changeset/91472>