Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline always stores frame #13627

Merged
merged 1 commit into from Oct 10, 2016

Conversation

@asajeffrey
Copy link
Member

asajeffrey commented Oct 6, 2016

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 -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes do not require tests because refactoring

This change is Reviewable

@highfive
Copy link

highfive commented Oct 6, 2016

Heads up! This PR modifies the following files:

  • @KiChjang: components/script/dom/htmliframeelement.rs, components/script/dom/bindings/trace.rs, components/script_traits/lib.rs, components/script_traits/lib.rs
@highfive
Copy link

highfive commented Oct 6, 2016

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!
@asajeffrey
Copy link
Member Author

asajeffrey commented Oct 6, 2016

The first commit is from #13498, and isn't really part of this PR.

@cbrewster
Copy link
Member

cbrewster commented Oct 7, 2016

cc @paulrouget were you still interested in having pipelines that are detached from Frames?

@paulrouget
Copy link
Contributor

paulrouget commented Oct 7, 2016

@paulrouget were you still interested in having pipelines that are detached from Frames?

That used to be a thing, but no, not anymore.

I see no problem with this PR.

@bors-servo
Copy link
Contributor

bors-servo commented Oct 7, 2016

The latest upstream changes (presumably #13596) made this pull request unmergeable. Please resolve the merge conflicts.

@asajeffrey asajeffrey force-pushed the asajeffrey:pipeline-always-stores-frame-id branch from 9d0ed77 to e47a2ff Oct 7, 2016
@bors-servo
Copy link
Contributor

bors-servo commented Oct 7, 2016

The latest upstream changes (presumably #13498) made this pull request unmergeable. Please resolve the merge conflicts.

@asajeffrey asajeffrey force-pushed the asajeffrey:pipeline-always-stores-frame-id branch from e47a2ff to 8ca1cec Oct 7, 2016
@asajeffrey
Copy link
Member Author

asajeffrey commented Oct 7, 2016

#13498 has now landed, so this can now merge. r? @ConnorGBrewster

@highfive highfive assigned cbrewster and unassigned larsbergstrom Oct 7, 2016
@asajeffrey asajeffrey mentioned this pull request Oct 7, 2016
3 of 3 tasks complete
Copy link
Member

cbrewster left a comment

Looks good, except my one comment. Not 100% sure what to do in that case right now.

@@ -2007,7 +2008,7 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
// a dependent pipeline to be ready to paint.
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()

This comment has been minimized.

Copy link
@cbrewster

cbrewster Oct 9, 2016

Member

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.

This comment has been minimized.

Copy link
@asajeffrey

asajeffrey Oct 10, 2016

Author Member

I could add a is_mature flag to Pipeline, to capture the case where the frame id was None.

This comment has been minimized.

Copy link
@cbrewster

cbrewster Oct 10, 2016

Member

Let's do that!

This comment has been minimized.

Copy link
@asajeffrey

asajeffrey Oct 10, 2016

Author Member

Done.

Copy link
Member

cbrewster left a comment

Looks good to me except possibly 1 nit.

Squash and r=me

@@ -663,6 +663,7 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
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);

This comment has been minimized.

Copy link
@cbrewster

cbrewster Oct 10, 2016

Member

nit: should we use if let here instead of map since we are changing state.

This comment has been minimized.

Copy link
@asajeffrey

asajeffrey Oct 10, 2016

Author Member

Fixed. I think we should also get rid of those assertions, as they are potential sources of panic in the constellation.

@asajeffrey asajeffrey force-pushed the asajeffrey:pipeline-always-stores-frame-id branch from 1da8b65 to c7c45ce Oct 10, 2016
@asajeffrey
Copy link
Member Author

asajeffrey commented Oct 10, 2016

Squashed, @bors-servo r=ConnorGBrewster

@bors-servo
Copy link
Contributor

bors-servo commented Oct 10, 2016

📌 Commit c7c45ce has been approved by ConnorGBrewster

@bors-servo
Copy link
Contributor

bors-servo commented Oct 10, 2016

Testing commit c7c45ce with merge d175d63...

bors-servo added a commit that referenced this pull request Oct 10, 2016
…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 -->
@bors-servo
Copy link
Contributor

bors-servo commented Oct 10, 2016

💔 Test failed - linux-rel-wpt

@highfive
Copy link

highfive commented Oct 10, 2016

  ▶ Unexpected subtest result in /html/browsers/history/joint-session-history/joint-session-history-only-fully-active.html:
  └ PASS [expected FAIL] Do only fully active documents count for session history?

  ▶ TIMEOUT [expected OK] /_mozilla/mozilla/mozbrowser/mozbrowserlocationchange_event.html
  │ 
  │ VMware, Inc.
  │ Gallium 0.4 on softpipe
  └ 3.3 (Core Profile) Mesa 12.0.1

  ▶ Unexpected subtest result in /_mozilla/mozilla/mozbrowser/mozbr</span><span class="stdout">owserlocationchange_event.html:
  │ TIMEOUT [expected PASS] Browser API; mozbrowserlocationchange event
  └   → Test timed out
@asajeffrey asajeffrey force-pushed the asajeffrey:pipeline-always-stores-frame-id branch from c7c45ce to eef02dd Oct 10, 2016
@asajeffrey
Copy link
Member Author

asajeffrey commented Oct 10, 2016

Fixed a case where is_mature wasn't being set properly. @bors-servo r=ConnorGBrewster via irc.

@bors-servo
Copy link
Contributor

bors-servo commented Oct 10, 2016

📌 Commit eef02dd has been approved by ConnorGBrewster

@bors-servo
Copy link
Contributor

bors-servo commented Oct 10, 2016

Testing commit eef02dd with merge 51b806f...

bors-servo added a commit that referenced this pull request Oct 10, 2016
…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 -->
@bors-servo
Copy link
Contributor

bors-servo commented Oct 10, 2016

@bors-servo bors-servo merged commit eef02dd into servo:master Oct 10, 2016
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.