Thanks to visit codestin.com
Credit goes to github.com

Skip to content

devtools: Fix inspector not loading when navigating on the same page#45056

Open
eerii wants to merge 1 commit into
servo:mainfrom
eerii:fix-inspector-navigation
Open

devtools: Fix inspector not loading when navigating on the same page#45056
eerii wants to merge 1 commit into
servo:mainfrom
eerii:fix-inspector-navigation

Conversation

@eerii
Copy link
Copy Markdown
Member

@eerii eerii commented May 21, 2026

Previously, navigating on a website with the DevTools inspector open would make it not show the new HTML tree and not properly update. It could only be fixed by disconnecting the DevTools client and connecting again.

Now navigation correctly updates the inspector, both for the same page and external navigation. We now get the BrowsingContextActor through the WatcherActor, which remains the same across navigations (unlike BrowsingContextActor). As a result, many actors were changed to have a reference to the watcher instead.

This is also a first step in cleaning the actor dependencies and avoid registration issues.

Know issues (better addressed in followups):

  • After navigating within the same domain, new console messages don't appear in the console. They appear again once navigating to a different domain.
  • The console messages are not cleared when navigating.
  • Navigating quickly through multiple pages can trigger an "already mutably borrowed" panic. This is an existing issue that is tracked in devtools: Panic with ActorRegistry already mutably borrowed #45055
  • After reloading, the HTML tree is not correctly displayed. A workaround is to manually navigate.

Testing: ./mach test-devtools
Fixes: #41848
Fixes: #42603
Part of: #39862
Part of: #45055

Previously, navigating on a website with the DevTools inspector open
would make it end up blank, something that could only be fixed by
disconnecting the DevTools client and connecting again.

Signed-off-by: eri <[email protected]>
@eerii eerii requested a review from atbrakhi as a code owner May 21, 2026 11:44
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

2 participants