WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
232699
Web Inspector: sync changes to settings across instances
https://bugs.webkit.org/show_bug.cgi?id=232699
Summary
Web Inspector: sync changes to settings across instances
Devin Rousso
Reported
2021-11-04 00:02:09 PDT
.
Attachments
[Patch] WIP
(66.24 KB, patch)
2021-11-04 01:49 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Devin Rousso
Comment 1
2021-11-04 01:49:25 PDT
Created
attachment 443285
[details]
[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)
Radar WebKit Bug Importer
Comment 2
2021-11-10 23:03:19 PST
<
rdar://problem/85286040
>
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