Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFrames in the constellation store LoadData rather than just URLs. #15878
Conversation
|
r? @cbrewster |
|
Looks good other than a couple nits |
components/constellation/frame.rs
Outdated
| @@ -81,7 +80,7 @@ impl Frame { | |||
| pub fn update_current(&mut self, pipeline_id: PipelineId, entry: &FrameState) { | |||
| self.pipeline_id = pipeline_id; | |||
| self.instant = entry.instant; | |||
| self.url = entry.url.clone(); | |||
| self.load_data = entry.load_data.clone(); | |||
This comment has been minimized.
This comment has been minimized.
cbrewster
Mar 12, 2017
Member
We should make update_current take ownership of entry to remove this clone.
This comment has been minimized.
This comment has been minimized.
| self.traverse_to_entry(entry); | ||
| (evicted_id, false, None, false) | ||
| (None, false, None, false) |
This comment has been minimized.
This comment has been minimized.
cbrewster
Mar 12, 2017
Member
Now that only one branch returns something other than None for evicted_id can we just move close_pipeline inside the only branch that uses it?
This comment has been minimized.
This comment has been minimized.
asajeffrey
Mar 14, 2017
Author
Member
Afraid not:
error[E0499]: cannot borrow `*self` as mutable more than once at a time
--> /home/ajeffrey/github/asajeffrey/servo/components/constellation/constellation.rs:2165:17
|
2156 | } else if let Some(frame) = self.frames.get_mut(&frame_change.frame_id) {
| ----------- first mutable borrow occurs here
...
2165 | self.close_pipeline(evicted_id, DiscardBrowsingContext::No, ExitPipelineMode::Normal);
| ^^^^ second mutable borrow occurs here
...
2171 | };
| - first borrow ends here
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
7cbd54c
to
90650da
components/constellation/frame.rs
Outdated
|
|
||
| /// Is the new document replacing the current document (e.g. a reload) | ||
| /// or pushing it into the session history (e.g. a navigation)? | ||
| pub replace: Option<FrameState>, | ||
| /// It it replacing an existing entry, we store its timestamp. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
90650da
to
1a44a76
|
@bors-servo r=cbrewster |
|
|
bors-servo
added a commit
that referenced
this pull request
Mar 14, 2017
…, r=cbrewster Frames in the constellation store LoadData rather than just URLs. <!-- Please describe your changes on the following line: --> Include LoadData in each session history entry, so that when we reload discarded documents we can include POST data etc. --- <!-- 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 fix #14888 - [X] These changes do not require tests because we don't test document discarding. <!-- 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/15878) <!-- Reviewable:end -->
|
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
asajeffrey commentedMar 9, 2017
•
edited by larsbergstrom
Include LoadData in each session history entry, so that when we reload discarded documents we can include POST data etc.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is