WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
73225
Web Inspector: put inspector agents into a vector in the InspectorController.
https://bugs.webkit.org/show_bug.cgi?id=73225
Summary
Web Inspector: put inspector agents into a vector in the InspectorController.
Pavel Feldman
Reported
2011-11-28 10:00:41 PST
Patch to follow.
Attachments
Patch
(63.95 KB, patch)
2011-11-28 10:04 PST
,
Pavel Feldman
no flags
Details
Formatted Diff
Diff
[Patch] review comments addressed.
(69.12 KB, patch)
2011-11-29 00:55 PST
,
Pavel Feldman
no flags
Details
Formatted Diff
Diff
[Patch] to land
(71.88 KB, patch)
2011-11-29 01:38 PST
,
Pavel Feldman
yurys
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Pavel Feldman
Comment 1
2011-11-28 10:04:33 PST
Created
attachment 116773
[details]
Patch
Yury Semikhatsky
Comment 2
2011-11-29 00:12:45 PST
Comment on
attachment 116773
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=116773&action=review
> Source/WebCore/ChangeLog:5 > +
Please describe the change here.
> Source/WebCore/ChangeLog:99 > + Web Inspector: align agent creation (factory vs constructors).
Remove this entry.
> Source/WebCore/inspector/InspectorBaseAgent.h:42 > +class InspectorBaseAgentInterface {
Consider moving it into its own file.
> Source/WebCore/inspector/InspectorBaseAgent.h:67 > + , m_agent(static_cast<T*>(this))
You don't need to keep it in a field, just apply this cast in registerDispatcher.
> Source/WebCore/inspector/InspectorController.h:34 > +#include "InspectorBaseAgent.h"
Forward declaration should suffice
Pavel Feldman
Comment 3
2011-11-29 00:22:06 PST
> > Source/WebCore/inspector/InspectorBaseAgent.h:42 > > +class InspectorBaseAgentInterface { > > Consider moving it into its own file. >
I consider InspectorBaseAgentInterface a part of the InspectroBaseAgent. It is just a convenience way for storing all agents in the same vector while implementing double dispatch using templates.
Ilya Tikhonovsky
Comment 4
2011-11-29 00:25:51 PST
Comment on
attachment 116773
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=116773&action=review
> Source/WebCore/inspector/CodeGeneratorInspector.py:1267 > + Generator.backend_setters_list.append(" void registerDispatcher(%s* %s) { m_%s = %s; }" % (agent_type_name, agent_field_name, agent_field_name, agent_field_name))
backend_agent_setters_list? registerAgent? I'd add ASSERT(!m_%s) here and m_%s = 0 in constructor.
> Source/WebCore/inspector/InspectorBaseAgent.h:34 > +#include "InspectorBackendDispatcher.h"
It is bad dependency.
> Source/WebCore/inspector/InspectorBaseAgent.h:60 > + dispatcher->registerDispatcher(m_agent);
Looks like you can do static cast right here and remove m_agent member.
Pavel Feldman
Comment 5
2011-11-29 00:55:24 PST
Created
attachment 116916
[details]
[Patch] review comments addressed.
Yury Semikhatsky
Comment 6
2011-11-29 01:09:00 PST
Comment on
attachment 116916
[details]
[Patch] review comments addressed. View in context:
https://bugs.webkit.org/attachment.cgi?id=116916&action=review
> Source/WebCore/inspector/InspectorController.cpp:162 > + (*it)->inspectedPageDestroyed();
You don't need this method.
Pavel Feldman
Comment 7
2011-11-29 01:38:29 PST
Created
attachment 116921
[details]
[Patch] to land
Pavel Feldman
Comment 8
2011-11-29 02:02:30 PST
Committed
r101345
: <
http://trac.webkit.org/changeset/101345
>
Adam Klein
Comment 9
2011-12-01 12:32:09 PST
(In reply to
comment #8
)
> Committed
r101345
: <
http://trac.webkit.org/changeset/101345
>
This change appears to be triggering errors on the Valgrind bots:
http://build.chromium.org/p/chromium.webkit/builders/Linux%20Valgrind/builds/17144/steps/memory%20test%3A%20test_shell/logs/stdio
I've filed a bug with details and a suggested fix:
https://bugs.webkit.org/show_bug.cgi?id=73582
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug