Client code should look like RuntimeAgent.evaluateOn("X"), not RuntimeAgent.evaluateOn("return X").
It turns out that the easiest would be to pass entire function declaration into this method.
Created attachment 101164 [details] Patch
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.
Created attachment 101594 [details] Patch
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 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.
Committed r91472: <http://trac.webkit.org/changeset/91472>