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.
Created attachment 82447 [details] [patch] initial version
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.
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.
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.
Comment on attachment 82482 [details] [patch] second version Clearing flags on attachment: 82482 Committed r78692: <http://trac.webkit.org/changeset/78692>
All reviewed patches have been landed. Closing bug.