Purge pipelines from distant history.#11893
Conversation
|
r? @asajeffrey |
|
cc @ConnorGBrewster |
|
Can someone summarise what that does? Is history still conserved even if pipelines are purged? |
|
@paulrouget I believe the idea is that we will keep |
Ok, so we keep the history even if the pipeline is purged. That's all I was worried about :) |
|
I'm quite concerned about what happens when pipelines share a script thread. If page A contains a same-origin iframe, which starts out at B1, then navigates to B2, B3 and B4. This will trigger |
|
Reviewed 1 of 1 files at r1. components/constellation/constellation.rs, line 222 [r1] (raw file):
The terminology of alive vs dead doesn't seem aligned with the spec. https://html.spec.whatwg.org/multipage/browsers.html#session-history has a note saying "when a Document is not active, it's possible for it to be discarded to free resources," defined in https://html.spec.whatwg.org/multipage/browsers.html#discard-a-document. components/constellation/constellation.rs, line 224 [r1] (raw file):
Should the data saved here be Is the privacy associated with the history entry or with the frame? (That is, can we have a frame, some of whose entries are private and some are public?) components/constellation/constellation.rs, line 244 [r1] (raw file):
Can we add a comment saying what the semantics of this function is? components/constellation/constellation.rs, line 246 [r1] (raw file):
Passing the pipelines hash map around seems like a break in the abstraction barrier between components/constellation/constellation.rs, line 247 [r1] (raw file):
What is this parameter for? components/constellation/constellation.rs, line 264 [r1] (raw file):
Shouldn't this functionality be in components/constellation/constellation.rs, line 273 [r1] (raw file):
Doesn't this exit a pipeline even if the script thread is being used by its parent? components/constellation/constellation.rs, line 1423 [r1] (raw file):
Should we set the window URL, even if it's a child iframe that caused this navigation? Comments from Reviewable |
|
As a general comment, it strikes me that this is one way of handling document discarding, but not the only way. Rather than having a per-frame hard limit on history, we could have a per-constellation soft limit. |
|
@Ms2ger is this still active? |
|
Yes, I'm going to get back to your review comments, hopefully this week. |
|
☔ The latest upstream changes (presumably #11866) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@Ms2ger ping? |
2f4953a to
0e5023b
Compare
|
Rebased. |
| let mut future = vec!(); | ||
| for frame in self.full_frame_tree_iter(frame_id_root) { | ||
| future.extend(frame.next.iter().map(|entry| (entry.instant, entry.frame_id, entry.pipeline_id))); | ||
| future.extend(frame.next.iter().map(|entry| (entry.instant, entry.frame_id, entry.entry.clone()))); |
There was a problem hiding this comment.
nit: maybe we should mess with the naming here to avoid entry.entry.
|
☔ The latest upstream changes (presumably #13211) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Review status: 0 of 1 files reviewed at latest revision, 10 unresolved discussions, some commit checks failed. components/constellation/constellation.rs, line 305 [r3] (raw file):
Should we be purging everything but the previous/next Comments from Reviewable |
0e5023b to
583e8e3
Compare
|
Added some docs for |
|
☔ The latest upstream changes (presumably #11698) made this pull request unmergeable. Please resolve the merge conflicts. |
583e8e3 to
18ca07d
Compare
|
☔ The latest upstream changes (presumably #13227) made this pull request unmergeable. Please resolve the merge conflicts. |
The recently added replace argument makes it less readable, especially with the second boolean argument I am adding in #11893.
Inline push_pending_frame into its callers. The recently added replace argument makes it less readable, especially with the second boolean argument I am adding in #11893. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13334) <!-- Reviewable:end -->
18ca07d to
4d3703f
Compare
4d3703f to
556d837
Compare
|
I have no idea what this is doing anymore. @asajeffrey @ConnorGBrewster, wanna take over? |
|
This is quite tricky, especially with sharing script threads (and there are bugs around when script threads are shared, sigh). We may need to postpone this until we get the sharing script threads story straight. Either that or we need to work out how to get a script thread to cope with some of its globals being dead, and some being alive. |
|
☔ The latest upstream changes (presumably #13498) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@asajeffrey is going to take over this work. He's planning to rework script thread sharing which will further impact this, and at this point it probably makes sense for him to just include purging in his plans. |
|
@ConnorGBrewster: document unloading will be in our future 😄 |
This change is