Skip to content

devtools: Correctly cache console messages#41895

Merged
mrobinson merged 3 commits intoservo:mainfrom
eerii:console-tweaks
Jan 15, 2026
Merged

devtools: Correctly cache console messages#41895
mrobinson merged 3 commits intoservo:mainfrom
eerii:console-tweaks

Conversation

@eerii
Copy link
Copy Markdown
Member

@eerii eerii commented Jan 13, 2026

Fix caching before the console is opened and stop sending messages prematurely.

Fix line numbers not showing in console messages because of a missing rename_all.

Remove getCachedMessages in favour of sending a list of messages as a reply to the watchResources for console-message/error-message in the watcher.

Remove startListeners and stopListeners. These are legacy methods of watching properties before the watcher actor. It is preferred to enable properties in supported_resources in the watcher than to use these messages.

Remove clearMessagesCache, only clearMessagesCacheAsync seems to be used now. Add a reply to clearMessagesCacheAsync.

Simplify a bit the structs for console messages and prefer serde's annotations to manual serialization. Merge handle_console_message and handle_page_error, and improve the usability of ConsoleResource.

Fix some fields in console messages. We are missing source_id for now. This will be easier to add after better support for source actors. We are also missing stack traces.

Before After
Console message list starting at 5 and counting up, showing the file location but not the line number Console message list starting at 1, showing both the file location and line number. It says "Connected here" at message number 4

Testing: Manual testing
Fixes: #26666

@eerii eerii requested a review from gterzian as a code owner January 13, 2026 17:55
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jan 13, 2026
Signed-off-by: eri <eri@igalia.com>
@servo-highfive servo-highfive added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jan 14, 2026
Signed-off-by: eri <eri@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
@servo-highfive servo-highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Jan 15, 2026
Copy link
Copy Markdown
Member

@mrobinson mrobinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation!

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Jan 15, 2026
Signed-off-by: eri <eri@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jan 15, 2026
@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Jan 15, 2026
@mrobinson mrobinson added this pull request to the merge queue Jan 15, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jan 15, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 15, 2026
@servo-highfive servo-highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jan 15, 2026
@mrobinson mrobinson added this pull request to the merge queue Jan 15, 2026
@servo-highfive servo-highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Jan 15, 2026
Merged via the queue into servo:main with commit 8cf4955 Jan 15, 2026
38 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jan 15, 2026
@eerii eerii deleted the console-tweaks branch January 16, 2026 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cached console messages are missing column numbers

3 participants