RESOLVED FIXED 54455
Web Inspector: move Database and DOMStorage related things from InspectorAgent
https://bugs.webkit.org/show_bug.cgi?id=54455
Summary Web Inspector: move Database and DOMStorage related things from InspectorAgent
Ilya Tikhonovsky
Reported 2011-02-15 06:41:40 PST
Some set of instrumentation calls should work even if we have no InspectorFrontend instance and corresponding agents. At the moment we are using InspectorAgent instance for such calls.
Attachments
[patch] initial version (23.50 KB, patch)
2011-02-15 06:54 PST, Ilya Tikhonovsky
pfeldman: review-
[patch] second version (23.64 KB, patch)
2011-02-15 10:31 PST, Ilya Tikhonovsky
no flags
Ilya Tikhonovsky
Comment 1 2011-02-15 06:54:28 PST
Created attachment 82447 [details] [patch] initial version
Yury Semikhatsky
Comment 2 2011-02-15 07:29:55 PST
Comment on attachment 82447 [details] [patch] initial version View in context: https://bugs.webkit.org/attachment.cgi?id=82447&action=review > Source/WebCore/ChangeLog:5 > + Web Inspector: move Database and DOMStorage related things from InspectorAgent to thecorresponding agents. thecorresponding -> the corresponding > Source/WebCore/inspector/InspectorAgent.cpp:142 > + , m_databaseAgentResources(InspectorDatabaseAgent::createOfflineStorage()) Consider renaming createOfflineStorage to createStorage > Source/WebCore/inspector/InspectorAgent.cpp:463 > + m_databaseAgentResources->pushDataCollectedOffline(m_frontend); pushDataCollectedOffline should be a method on the database agent. > Source/WebCore/inspector/InspectorAgent.cpp:466 > + m_domStorageAgentResources->pushDataCollectedOffline(m_frontend); Same here.
Pavel Feldman
Comment 3 2011-02-15 08:25:17 PST
Comment on attachment 82447 [details] [patch] initial version View in context: https://bugs.webkit.org/attachment.cgi?id=82447&action=review >> Source/WebCore/inspector/InspectorAgent.cpp:142 >> + , m_databaseAgentResources(InspectorDatabaseAgent::createOfflineStorage()) > > Consider renaming createOfflineStorage to createStorage This does not really make the agents modular. > Source/WebCore/inspector/InspectorAgent.cpp:393 > + m_databaseAgent = InspectorDatabaseAgent::create(databaseAgentResources(), m_frontend); Pass inspectorAgent into it instead. >> Source/WebCore/inspector/InspectorAgent.cpp:463 >> + m_databaseAgentResources->pushDataCollectedOffline(m_frontend); > > pushDataCollectedOffline should be a method on the database agent. This should be done upon agent instantiation, from within agent. >> Source/WebCore/inspector/InspectorAgent.cpp:466 >> + m_domStorageAgentResources->pushDataCollectedOffline(m_frontend); > > Same here. ditto. > Source/WebCore/inspector/InspectorAgent.h:105 > + virtual void pushDataCollectedOffline(InspectorFrontend*) = 0; I think adding pushToFrontend method to the storage does not make much sense. Storage should be simple, it should store.
Ilya Tikhonovsky
Comment 4 2011-02-15 10:31:10 PST
Created attachment 82482 [details] [patch] second version (In reply to comment #2) > (From update of attachment 82447 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=82447&action=review > > > Source/WebCore/ChangeLog:5 > > + Web Inspector: move Database and DOMStorage related things from InspectorAgent to thecorresponding agents. > > thecorresponding -> the corresponding done > > Source/WebCore/inspector/InspectorAgent.cpp:142 > > + , m_databaseAgentResources(InspectorDatabaseAgent::createOfflineStorage()) > > Consider renaming createOfflineStorage to createStorage done > > Source/WebCore/inspector/InspectorAgent.cpp:463 > > + m_databaseAgentResources->pushDataCollectedOffline(m_frontend); > > pushDataCollectedOffline should be a method on the database agent. This call is moved into ctor of InspectorDatabaseAgent. > > Source/WebCore/inspector/InspectorAgent.cpp:466 > > + m_domStorageAgentResources->pushDataCollectedOffline(m_frontend); > > Same here. This call is moved into ctor of InspectorDOMStorageAgent.
Ilya Tikhonovsky
Comment 5 2011-02-16 03:21:49 PST
Comment on attachment 82482 [details] [patch] second version Clearing flags on attachment: 82482 Committed r78692: <http://trac.webkit.org/changeset/78692>
Ilya Tikhonovsky
Comment 6 2011-02-16 03:22:01 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.