Bug 51250 - Web Inspector: introduce enabled/disabled flag for each domain handler
Summary: Web Inspector: introduce enabled/disabled flag for each domain handler
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Ilya Tikhonovsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-17 06:59 PST by Ilya Tikhonovsky
Modified: 2022-03-01 02:49 PST (History)
11 users (show)

See Also:


Attachments
[patch] first version. (54.04 KB, patch)
2010-12-17 08:07 PST, Ilya Tikhonovsky
no flags Details | Formatted Diff | Diff
[patch] initial version (14.10 KB, patch)
2010-12-17 08:12 PST, Ilya Tikhonovsky
pfeldman: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Tikhonovsky 2010-12-17 06:59:31 PST
Now each function belongs to a domain and we have a protocol which will be used by third party clients like ChromeDevTools plugin for Eclipse.
As far as such clients use only small subset of commands we want to have a way to enable required subset of protocol functions explicitly.
Comment 1 Ilya Tikhonovsky 2010-12-17 08:07:45 PST
Created attachment 76880 [details]
[patch] first version.
Comment 2 Ilya Tikhonovsky 2010-12-17 08:10:26 PST
Comment on attachment 76880 [details]
[patch] first version.

wrong patch
Comment 3 Ilya Tikhonovsky 2010-12-17 08:12:07 PST
Created attachment 76882 [details]
[patch] initial version
Comment 4 Pavel Feldman 2010-12-18 11:35:53 PST
Comment on attachment 76882 [details]
[patch] initial version

This looks good, except for... I'd rather start with domain agents refactorings to make them independent and switchable on/off. Otherwise you risk ending up with a nice flag that means nothing (i.e. can't be backed up with proper implementation). Like turning off "Backend" is impossible. Or having CSS with no DOM is impossible. Give me some time to think about it please.
Comment 5 Ilya Tikhonovsky 2010-12-22 02:25:31 PST
(In reply to comment #4)
> (From update of attachment 76882 [details])
> This looks good, except for... I'd rather start with domain agents refactorings to make them independent and switchable on/off. Otherwise you risk ending up with a nice flag that means nothing (i.e. can't be backed up with proper implementation). Like turning off "Backend" is impossible. Or having CSS with no DOM is impossible. Give me some time to think about it please.

Proposed change works like a mute button.
It will not affect the data which we keep at backend side unconditionally like list of workers etc.

It can makes a problem if we have a notification method for some event and have no explicit getter for the data of such event. But it is not a problem for a frontend if it turns on the required domains immediately at connect stage. It is not a problem for WebInspector frontend at all because it turns on everything at connect stage :).

Right now we have such nice flags for Profiler and Debugger agents. These flags will be replaced with generic ones after this change.

We have no such flags for the other domains but it is not a problem for WebInspector frontend and just some amount of unnecessary CPU cycles if a domain's messages were muted by a frontend. We can fix such problems one by one for the each domain in separate patches.

I can introduce functions like enableDOMAgent, enableCSSAgent etc. but from the protocol point of view a single function for enabling/disabling the agents is much better than 12 different functions. 
1) less messages;
2) single single point of control;
3) no races between different domains if the domains have a cross dependency.
4) and the protocol will be closer to ready state a bit earlier.
Comment 6 Eric Seidel (no email) 2011-01-11 03:09:31 PST
Comment on attachment 76882 [details]
[patch] initial version

Did you mean to mark this for review?  Currently it only has cq?, not r?
Comment 7 Pavel Feldman 2011-01-11 04:44:38 PST
Comment on attachment 76882 [details]
[patch] initial version

Lets land it later, when all agents have clear lifetime.