Bug 42457

Summary: Web Inspector: should be possible to convert console message arguments to InspectorValues
Product: WebKit Reporter: Yury Semikhatsky <yurys>
Component: Web Inspector (Deprecated)Assignee: Yury Semikhatsky <yurys>
Status: RESOLVED FIXED    
Severity: Normal CC: bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch pfeldman: review+

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