[Webkit-unassigned] [Bug 232699] Web Inspector: sync changes to settings across instances

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 4 01:49:25 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=232699

Devin Rousso <drousso at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |drousso at apple.com

--- Comment #1 from Devin Rousso <drousso at apple.com> ---
Created attachment 443285

  --> https://bugs.webkit.org/attachment.cgi?id=443285&action=review

[Patch] WIP

Now that `BroadcastChannel` exists, I figured I'd give this a shot as it's something I've always wanted to try :)

Having used it briefly, however, I'm a bit conflicted.

On one hand, there definitely is something super awesome about things just magically syncing between Web Inspector instances (e.g. adding a JS breakpoint in one will make it appear (assuming you're inspecting the same page) in the other).  If not everything it would at least be nice to have more general UI things sync (e.g. Appearance, indentation style, etc.).

On the other hand, having Web Inspector instances be (mostly) isolated means that you can do different things in each while they're both simultaneously open.  As an example, when debugging two versions of the same site (e.g. the server sends back different content depending on some state) it may actually be incorrect to sync things like breakpoints as the contents of resources with the same `objectIdentifier` may not be the same (note that `objectIdentifier` is intended to be a way of uniquely identifying something within a specific Web Inspector, not globally).

Regardless, there are still some kinks to work out in this
- figure out how to guarantee that `WI.FrontendSynchronizer.close();` is called, no matter how Web Inspector is closed
- make sure all `WI.Setting` actually listen for changes (e.g. `_bootstrapScriptEnabledSetting`)
- write some tests (will likely have to be an API test as I don't think LayoutTests allow for multiple pages/inspectors)
- confirm that no extra work is being done if there are no other Web Inspector frontends to talk to
- audit the codepaths surrounding each usage of `WI.FrontendSynchronizer` to really make sure that there's no re-entrancy or infinite ping-pong (`BroadcastChannel` is only supposed to send a `"message"` to _other_ instances, but if they then turn around and send it right back then we're in a bit of a pickle)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211104/ab470ec5/attachment.htm>


More information about the webkit-unassigned mailing list