WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
52442
Web Inspector: do not use this as protocol message dispatcher in models / agents.
https://bugs.webkit.org/show_bug.cgi?id=52442
Summary
Web Inspector: do not use this as protocol message dispatcher in models / age...
Pavel Feldman
Reported
2011-01-14 05:18:19 PST
Models should never for InspectorBackend.registerDomainDispatcher("foo", this). There should be a clear way to tell whether method is being called from within front-end or by the backend.
Attachments
[PATCH] Proposed change.
(34.09 KB, patch)
2011-01-14 05:27 PST
,
Pavel Feldman
no flags
Details
Formatted Diff
Diff
[PATCH] Review comments addressed.
(34.95 KB, patch)
2011-01-14 06:36 PST
,
Pavel Feldman
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Pavel Feldman
Comment 1
2011-01-14 05:27:19 PST
Created
attachment 78930
[details]
[PATCH] Proposed change.
Ilya Tikhonovsky
Comment 2
2011-01-14 06:07:21 PST
Comment on
attachment 78930
[details]
[PATCH] Proposed change. View in context:
https://bugs.webkit.org/attachment.cgi?id=78930&action=review
> Source/WebCore/inspector/front-end/DOMAgent.js:396 > - this._idToDOMNode = {}; > + this._domAgent._idToDOMNode = {}; > if (payload && "id" in payload) { > - this.document = new WebInspector.DOMDocument(this, this._window, payload); > - this._idToDOMNode[payload.id] = this.document; > - this._bindNodes(this.document.children); > + this._domAgent.document = new WebInspector.DOMDocument(this, this._domAgent._window, payload); > + this._domAgent._idToDOMNode[payload.id] = this._domAgent.document; > + this._domAgent._bindNodes(this._domAgent.document.children); > WebInspector.breakpointManager.restoreDOMBreakpoints(); > } else > - this.document = null; > - WebInspector.panels.elements.setDocument(this.document); > + this._domAgent.document = null; > + WebInspector.panels.elements.setDocument(this._domAgent.document);
please make it a pure delegate.
> Source/WebCore/inspector/front-end/ProfilesPanel.js:633 > +WebInspector.ProfilerDispatcher.prototype = { > + profilerWasEnabled: function() > + { > + if (this._profiler._profilerEnabled) > + return; > + > + this._profiler._profilerEnabled = true; > + > + this._profiler._reset(); > + if (this._profiler.visible) > + this._profiler._populateProfiles(); > + },
ditto
> Source/WebCore/inspector/front-end/ProfilesPanel.js:642 > + profilerWasDisabled: function() > + { > + if (!this._profiler._profilerEnabled) > + return; > + > + this._profiler._profilerEnabled = false; > + this._profiler._reset(); > + },
ditto
Pavel Feldman
Comment 3
2011-01-14 06:36:23 PST
Created
attachment 78938
[details]
[PATCH] Review comments addressed.
Pavel Feldman
Comment 4
2011-01-14 06:51:02 PST
Comment on
attachment 78938
[details]
[PATCH] Review comments addressed. Clearing flags on attachment: 78938 Committed
r75791
: <
http://trac.webkit.org/changeset/75791
>
Pavel Feldman
Comment 5
2011-01-14 06:51:13 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.
Top of Page
Format For Printing
XML
Clone This Bug