RESOLVED FIXED 54971
Web Inspector: it should be possible to pass custom error text from a backend method to frontend.
https://bugs.webkit.org/show_bug.cgi?id=54971
Summary Web Inspector: it should be possible to pass custom error text from a backend...
Ilya Tikhonovsky
Reported 2011-02-22 10:33:11 PST
Each command response should have boolean success and string error message as in protocol above.
Attachments
[patch] initial version (81.19 KB, patch)
2011-02-22 10:35 PST, Ilya Tikhonovsky
no flags
[patch] second version. (83.46 KB, patch)
2011-02-24 01:33 PST, Ilya Tikhonovsky
no flags
Ilya Tikhonovsky
Comment 1 2011-02-22 10:35:55 PST
Created attachment 83339 [details] [patch] initial version
Pavel Feldman
Comment 2 2011-02-22 10:58:10 PST
Comment on attachment 83339 [details] [patch] initial version View in context: https://bugs.webkit.org/attachment.cgi?id=83339&action=review > Source/WebCore/inspector/InspectorAgent.h:204 > + void enableProfiler(InspectorArray* errors = 0); I understand that the protocol layer allows multiple errors, but the user layer is used to returning an error message (single string). > Source/WebCore/inspector/InspectorAgent.h:205 > + void disableProfiler(InspectorArray* errors = 0); You force methods to check for errors existence - not nice.
Ilya Tikhonovsky
Comment 3 2011-02-24 01:33:53 PST
Created attachment 83620 [details] [patch] second version. This version uses String* as the placeholder for the error text.
Pavel Feldman
Comment 4 2011-02-24 02:06:18 PST
Comment on attachment 83620 [details] [patch] second version. View in context: https://bugs.webkit.org/attachment.cgi?id=83620&action=review One thing would improve this change: if you could replace String* with ErrorString* and accompany it with typedef String ErrorString, that would improve error handling visibility to the agent authors. > Source/WebCore/ChangeLog:5 > + Web Inspector: There is a validator of the protocol message format. Please add bug url into the changelog. > Source/WebCore/ChangeLog:19 > + * inspector/InjectedScriptHost.cpp: Not sure you need it all here, I would leave names of the files only.
Ilya Tikhonovsky
Comment 5 2011-02-24 03:44:08 PST
Committed r79539 M Source/WebCore/ChangeLog M Source/WebCore/inspector/InspectorRuntimeAgent.h M Source/WebCore/inspector/InspectorDebuggerAgent.h M Source/WebCore/inspector/CodeGeneratorInspector.pm M Source/WebCore/inspector/InspectorCSSAgent.h M Source/WebCore/inspector/InjectedScriptHost.cpp M Source/WebCore/inspector/InspectorController.cpp M Source/WebCore/inspector/InspectorTimelineAgent.cpp M Source/WebCore/inspector/InspectorConsoleAgent.h M Source/WebCore/inspector/InspectorDatabaseAgent.h M Source/WebCore/inspector/InspectorAgent.cpp M Source/WebCore/inspector/InspectorProfilerAgent.cpp M Source/WebCore/inspector/InspectorRuntimeAgent.cpp M Source/WebCore/inspector/InspectorBrowserDebuggerAgent.cpp M Source/WebCore/inspector/InspectorDOMStorageAgent.cpp M Source/WebCore/inspector/InspectorTimelineAgent.h M Source/WebCore/inspector/InspectorProfilerAgent.h M Source/WebCore/inspector/InspectorBrowserDebuggerAgent.h M Source/WebCore/inspector/InspectorDOMStorageAgent.h M Source/WebCore/inspector/InspectorDOMAgent.h M Source/WebCore/inspector/InspectorDebuggerAgent.cpp M Source/WebCore/inspector/InspectorCSSAgent.cpp M Source/WebCore/inspector/InspectorApplicationCacheAgent.h M Source/WebCore/inspector/InspectorResourceAgent.h M Source/WebCore/inspector/InspectorConsoleAgent.cpp M Source/WebCore/inspector/InspectorDatabaseAgent.cpp M Source/WebCore/inspector/InspectorDOMAgent.cpp M Source/WebCore/inspector/InspectorAgent.h M Source/WebCore/inspector/InspectorResourceAgent.cpp M Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp r79539 = df5982d5c9853446953cbb1b35c1c1986a2a9830 (refs/remotes/trunk)
Ilya Tikhonovsky
Comment 6 2011-02-24 04:03:26 PST
build fix Committed r79542 M Source/WebCore/ChangeLog M Source/WebCore/inspector/InspectorRuntimeAgent.cpp M Source/WebCore/inspector/InspectorDOMAgent.cpp M Source/WebCore/inspector/InspectorResourceAgent.cpp r79542 = 6e8066bfb8a0ea75b42df82b0ec0da2857fc8996 (refs/remotes/trunk)
Note You need to log in before you can comment on or make changes to this bug.