Bug 42457 - Web Inspector: should be possible to convert console message arguments to InspectorValues
Summary: Web Inspector: should be possible to convert console message arguments to Ins...
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: Yury Semikhatsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-16 08:26 PDT by Yury Semikhatsky
Modified: 2010-07-22 07:34 PDT (History)
9 users (show)

See Also:


Attachments
Patch (25.39 KB, patch)
2010-07-22 04:39 PDT, Yury Semikhatsky
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yury Semikhatsky 2010-07-16 08:26:33 PDT
Web Inspector: should be possible to convert console message arguments to InspectorValues. This is a bit different from other back end<->front end message parameters in that it should be built from VM-specific JS object residing in the inspected page context.
Comment 1 Yury Semikhatsky 2010-07-22 04:39:37 PDT
Created attachment 62285 [details]
Patch
Comment 2 Pavel Feldman 2010-07-22 04:52:02 PDT
Comment on attachment 62285 [details]
Patch

r+ with comments. Please fix prior to landing.
Comment 3 Pavel Feldman 2010-07-22 04:56:28 PDT
Comment on attachment 62285 [details]
Patch

WebCore/bindings/js/ScriptValue.cpp:145
 +      return 0;
Regex is lost here. Consider running toString by default.

WebCore/inspector/ConsoleMessage.h:55
 +      void addToFrontend(RemoteInspectorFrontend*, InjectedScriptHost*);
Bring InspectorFrontend2 back!
Comment 4 Yury Semikhatsky 2010-07-22 05:45:34 PDT
(In reply to comment #3)
> (From update of attachment 62285 [details])
> WebCore/bindings/js/ScriptValue.cpp:145
>  +      return 0;
> Regex is lost here. Consider running toString by default.
>
That is fine that it's lost,  JSON.stringify(new RegExp(...)) will always return undefined. It's caller responsibility to prepare a convertible object.

> WebCore/inspector/ConsoleMessage.h:55
>  +      void addToFrontend(RemoteInspectorFrontend*, InjectedScriptHost*);
> Bring InspectorFrontend2 back!
What do you mean?
Comment 5 Yury Semikhatsky 2010-07-22 07:34:45 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/bindings/js/ScriptValue.cpp
	M	WebCore/bindings/js/ScriptValue.h
	M	WebCore/bindings/v8/ScriptValue.cpp
	M	WebCore/bindings/v8/ScriptValue.h
	M	WebCore/inspector/ConsoleMessage.cpp
	M	WebCore/inspector/ConsoleMessage.h
	M	WebCore/inspector/InjectedScript.cpp
	M	WebCore/inspector/InjectedScript.h
	M	WebCore/inspector/Inspector.idl
	M	WebCore/inspector/InspectorBackend.cpp
	M	WebCore/inspector/InspectorBackend.h
	M	WebCore/inspector/InspectorBackend.idl
	M	WebCore/inspector/InspectorController.cpp
	M	WebCore/inspector/front-end/ConsoleView.js
	M	WebCore/inspector/front-end/inspector.js
Committed r63891