Bug 51707

Summary: Web Inspector: extract Database & DOM Storage agents; remove InspectorBackend.
Product: WebKit Reporter: Pavel Feldman <pfeldman>
Component: Web Inspector (Deprecated)Assignee: Pavel Feldman <pfeldman>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, apavlov, bweinstein, eric, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed change.
yurys: review+
[PATCH] Review comments addressed (for try bots). none

Description Pavel Feldman 2010-12-29 07:48:11 PST
This change brushes up storage agents + removes redundant InspectorBackend class.
Comment 1 Pavel Feldman 2010-12-29 08:00:17 PST
Created attachment 77619 [details]
[PATCH] Proposed change.
Comment 2 Yury Semikhatsky 2010-12-29 08:23:33 PST
Comment on attachment 77619 [details]
[PATCH] Proposed change.

View in context: https://bugs.webkit.org/attachment.cgi?id=77619&action=review

> WebCore/inspector/InspectorDOMStorageAgent.cpp:35
> +#include "Frame.h"

style: headers should be sorted in alphabetical order. I wonder why the style checker didn't catch this.
Comment 3 Ilya Tikhonovsky 2010-12-29 08:29:44 PST
View in context: https://bugs.webkit.org/attachment.cgi?id=77619&action=review

> WebCore/inspector/CodeGeneratorInspector.pm:55
>  $typeTransform{"FileSystem"} = {
>      "forward" => "InspectorFileSystemAgent",
>      "header" => "InspectorFileSystemAgent.h",
> -    "domainAccessor" => "m_inspectorController->fileSystemAgent()",
> +    "domainAccessor" => "m_inspectorController->m_fileSystemAgent",

please also sort this one too.

> WebCore/inspector/InspectorController.cpp:-1058
> -

it is not possible to comment the code which is not in the diff. I do the comments here.

looks like the next code should be moved to the Database agent and it will be called if the agent exists.

1068|1053     // Resources are only bound while visible.
1069|1054     if (m_frontend)
1070|1055         resource->bind(m_frontend.get());

> WebCore/inspector/InspectorController.cpp:-1178
>      if (m_frontend)
>          resource->bind(m_frontend.get());
>  }
> -

the same here. It should be a function of DOMStorageAgent.

> WebCore/inspector/InspectorDOMStorageAgent.h:31
> +

I think we need a guard here.

#if ENABLE(INSPECTOR) && ENABLE(DOM_STORAGE)

> WebCore/inspector/InspectorDatabaseAgent.h:31
> +

ditto.
#if ENABLE(INSPECTOR) && ENABLE(DATABASE)
Comment 4 Pavel Feldman 2010-12-29 12:43:44 PST
Created attachment 77638 [details]
[PATCH] Review comments addressed (for try bots).
Comment 5 WebKit Review Bot 2010-12-29 14:13:57 PST
http://trac.webkit.org/changeset/74755 might have broken SnowLeopard Intel Release (Tests)
The following tests are not passing:
inspector/debugger-autocontinue-on-syntax-error.html
inspector/debugger-breakpoints-not-activated-on-reload.html
inspector/debugger-cyclic-ref.html
inspector/debugger-eval-on-call-frame.html
inspector/debugger-eval-while-paused.html
inspector/debugger-expand-scope.html
inspector/debugger-no-nested-pause.html
inspector/debugger-pause-in-eval-script.html
inspector/debugger-pause-on-breakpoint.html
inspector/debugger-pause-on-debugger-statement.html
inspector/debugger-pause-on-exception.html
inspector/debugger-proto-property.html
inspector/debugger-step-in.html
inspector/debugger-step-out.html
inspector/debugger-step-over.html
inspector/debugger-suspend-active-dom-objects.html
Comment 6 Eric Seidel (no email) 2010-12-29 18:32:07 PST
Did this get landed?  The sheriffbot seems to think it did (and then broke things).
Comment 7 Pavel Feldman 2010-12-29 23:42:45 PST
(In reply to comment #6)
> Did this get landed?  The sheriffbot seems to think it did (and then broke things).

It did land for a change or two and got reverted. Re-applying it now:

Committing to http://svn.webkit.org/repository/webkit/trunk ...
	C	WebCore/inspector/InspectorStorageAgent.h => WebCore/inspector/InspectorDOMStorageAgent.h
	R	WebCore/inspector/InspectorStorageAgent.cpp => WebCore/inspector/InspectorDatabaseAgent.cpp
	R	WebCore/inspector/InspectorStorageAgent.h => WebCore/inspector/InspectorDatabaseAgent.h
	D	WebCore/inspector/InspectorBackend.cpp
	D	WebCore/inspector/InspectorBackend.h
	M	LayoutTests/inspector/report-protocol-errors-expected.txt
	M	WebCore/CMakeLists.txt
	M	WebCore/ChangeLog
	M	WebCore/GNUmakefile.am
	M	WebCore/WebCore.gypi
	M	WebCore/WebCore.pro
	M	WebCore/WebCore.vcproj/WebCore.vcproj
	M	WebCore/WebCore.xcodeproj/project.pbxproj
	M	WebCore/inspector/CodeGeneratorInspector.pm
	M	WebCore/inspector/InjectedScriptHost.cpp
	M	WebCore/inspector/Inspector.idl
	M	WebCore/inspector/InspectorController.cpp
	M	WebCore/inspector/InspectorController.h
	A	WebCore/inspector/InspectorDOMStorageAgent.cpp
	M	WebCore/inspector/front-end/ScriptsPanel.js
	M	WebKit/chromium/src/WebDevToolsFrontendImpl.cpp
Committed r74785