Pipeline always stores frame#13627
Conversation
|
Heads up! This PR modifies the following files:
|
|
The first commit is from #13498, and isn't really part of this PR. |
|
cc @paulrouget were you still interested in having pipelines that are detached from |
That used to be a thing, but no, not anymore. I see no problem with this PR. |
|
☔ The latest upstream changes (presumably #13596) made this pull request unmergeable. Please resolve the merge conflicts. |
9d0ed77 to
e47a2ff
Compare
|
☔ The latest upstream changes (presumably #13498) made this pull request unmergeable. Please resolve the merge conflicts. |
e47a2ff to
8ca1cec
Compare
|
#13498 has now landed, so this can now merge. r? @ConnorGBrewster |
cbrewster
left a comment
There was a problem hiding this comment.
Looks good, except my one comment. Not 100% sure what to do in that case right now.
| while let Some(valid_frame_change) = self.pending_frames.iter().rposition(|frame_change| { | ||
| let waiting_on_dependency = frame_change.old_pipeline_id.map_or(false, |old_pipeline_id| { | ||
| self.pipelines.get(&old_pipeline_id).map(|pipeline| pipeline.frame).is_none() | ||
| self.pipelines.get(&old_pipeline_id).and_then(|pipeline| self.frames.get(&pipeline.frame_id)).is_none() |
There was a problem hiding this comment.
I don't believe this is equivalent to what we had before. Before, if frame is None, it means that the pipeline has not matured yet. In this change it is checking if the Frame exists. I think this will actually be ok, just because I am not sure if we ever have a scenario where one pending frame change is waiting on another.
There was a problem hiding this comment.
I could add a is_mature flag to Pipeline, to capture the case where the frame id was None.
cbrewster
left a comment
There was a problem hiding this comment.
Looks good to me except possibly 1 nit.
Squash and r=me
| assert!(self.pipelines.get(&pipeline_id).map(|pipeline| pipeline.frame_id == frame_id).unwrap_or(false)); | ||
| assert!(!self.frames.contains_key(&frame_id)); | ||
|
|
||
| self.pipelines.get_mut(&pipeline_id).map(|pipeline| pipeline.is_mature = true); |
There was a problem hiding this comment.
nit: should we use if let here instead of map since we are changing state.
There was a problem hiding this comment.
Fixed. I think we should also get rid of those assertions, as they are potential sources of panic in the constellation.
1da8b65 to
c7c45ce
Compare
|
Squashed, @bors-servo r=ConnorGBrewster |
|
📌 Commit c7c45ce has been approved by |
…ConnorGBrewster Pipeline always stores frame <!-- Please describe your changes on the following line: --> This change makes the pipeline always store the frame id, not just optionally. This is the first part of a long slog to use FrameIds rather than PipelineIds to identify frames. cc @ConnorGBrewster --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because refactoring <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/13627) <!-- Reviewable:end -->
|
💔 Test failed - linux-rel-wpt |
|
c7c45ce to
eef02dd
Compare
|
Fixed a case where |
|
📌 Commit eef02dd has been approved by |
…ConnorGBrewster Pipeline always stores frame <!-- Please describe your changes on the following line: --> This change makes the pipeline always store the frame id, not just optionally. This is the first part of a long slog to use FrameIds rather than PipelineIds to identify frames. cc @ConnorGBrewster --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because refactoring <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/13627) <!-- Reviewable:end -->
|
☀️ Test successful - arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-dev |
This change makes the pipeline always store the frame id, not just optionally. This is the first part of a long slog to use FrameIds rather than PipelineIds to identify frames. cc @ConnorGBrewster
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is