Skip to content

constellation: Move pending_changes to ConstellationWebView - #47341

Merged
mrobinson merged 1 commit into
servo:mainfrom
mrobinson:move-pending-changes-to-constellation-webview
Aug 19, 2026
Merged

mrobinson merged 1 commit into
servo:mainfrom
mrobinson:move-pending-changes-to-constellation-webview

Conversation

@mrobinson

Copy link
Copy Markdown
Member

This makes dealing with pending changes a bit more complicated, but once
more members of Constellation are moved to ConstellationWebView,
this should become simpler.

Testing: This should not change observable behavior so should be covered by existing tests.
Fixes: This is part of #47294.

@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Aug 18, 2026
@Narfinger

Copy link
Copy Markdown
Contributor

Not sure if I will have time to review it in detail but I am wondering about something: A couple of times we iterate over a vector that gets collected from an iterator. We could just iterate directly over the iterator.

@mrobinson

Copy link
Copy Markdown
Member Author

Not sure if I will have time to review it in detail but I am wondering about something: A couple of times we iterate over a vector that gets collected from an iterator. We could just iterate directly over the iterator.

This points at the problem all of these changes are trying to solve. We typically cannot keep the iterators alive because they borrow self and then while iterating over them a method is called that takes &mut self.

self.add_pending_change(SessionHistoryChange {

let Some(webview) = self.webviews.get_mut(&webview_id) else {
return warn!("Adding pending chnage to unknown WebView: {webview_id:?}");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
return warn!("Adding pending chnage to unknown WebView: {webview_id:?}");
return warn!("Adding pending change to unknown WebView: {webview_id:?}");

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

👍

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Aug 19, 2026
This makes dealing with pending changes a bit more complicated, but once
more members of `Constellation` are moved to `ConstellationWebView`,
this should become simpler.

Signed-off-by: Martin Robinson <[email protected]>
@mrobinson
mrobinson force-pushed the move-pending-changes-to-constellation-webview branch from 67a2c0c to 78858ea Compare August 19, 2026 18:03
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Aug 19, 2026
@mrobinson
mrobinson enabled auto-merge August 19, 2026 18:03
@mrobinson
mrobinson added this pull request to the merge queue Aug 19, 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 Aug 19, 2026
Merged via the queue into servo:main with commit 24bee0c Aug 19, 2026
36 checks passed
@mrobinson
mrobinson deleted the move-pending-changes-to-constellation-webview branch August 19, 2026 21:27
@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 Aug 19, 2026
RichardTjokroutomo pushed a commit to RichardTjokroutomo/servo that referenced this pull request Oct 6, 2026
…o#47341)

This makes dealing with pending changes a bit more complicated, but once
more members of `Constellation` are moved to `ConstellationWebView`,
this should become simpler.

Testing: This should not change observable behavior so should be covered
by existing tests.
Fixes: This is part of servo#47294.

Signed-off-by: Martin Robinson <[email protected]>
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

Development

Successfully merging this pull request may close these issues.

4 participants