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 upProvide the fetched data to fetch() consumers. #13597
Merged
Conversation
highfive
commented
Oct 5, 2016
|
Heads up! This PR modifies the following files:
|
|
@bors-servo try |
bors-servo
added a commit
that referenced
this pull request
Oct 5, 2016
Provide the fetched data to fetch() consumers.
components/script/dom/request.rs
Outdated
| @@ -662,20 +665,19 @@ impl BodyOperations for Request { | |||
| self.BodyUsed() | |||
| } | |||
|
|
|||
| fn set_body_promise(&self, p: &Rc<Promise>, body_type: BodyType) { | |||
| self.body_used.set(true); | |||
| assert!(mem::replace(&mut *self.body_promise.borrow_mut(), Some((p.clone(), body_type))).is_none()); | |||
This comment has been minimized.
This comment has been minimized.
components/script/dom/response.rs
Outdated
| @@ -194,18 +197,25 @@ impl BodyOperations for Response { | |||
| self.BodyUsed() | |||
| } | |||
|
|
|||
| fn set_body_promise(&self, p: &Rc<Promise>, body_type: BodyType) { | |||
| self.body_used.set(true); | |||
| assert!(mem::replace(&mut *self.body_promise.borrow_mut(), Some((p.clone(), body_type))).is_none()); | |||
This comment has been minimized.
This comment has been minimized.
jdm
Oct 5, 2016
Member
This is a complicated way of writing
assert!(self.body_promise.borrow().is_none());
*self.body_promise.borrow_mut() = Some(p.clone(), body_type);which I would prefer.
| } | ||
|
|
||
| // https://fetch.spec.whatwg.org/#concept-body-consume-body | ||
| #[allow(unrooted_must_root)] |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
components/script/body.rs
Outdated
| }; | ||
| }, | ||
| Err(err) => promise.reject_error(cx, err), | ||
| if let Some(body) = object.take_body() { |
This comment has been minimized.
This comment has been minimized.
|
|
|
@bors-servo try |
bors-servo
added a commit
that referenced
this pull request
Oct 5, 2016
Provide the fetched data to fetch() consumers. <!-- 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/13597) <!-- Reviewable:end -->
|
|
|
We probably need a compartment for the JSON case. |
|
@bors-servo try |
bors-servo
added a commit
that referenced
this pull request
Oct 6, 2016
Provide the fetched data to fetch() consumers. <!-- 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/13597) <!-- Reviewable:end -->
|
|
bors-servo
added a commit
that referenced
this pull request
Oct 6, 2016
Provide the fetched data to fetch() consumers. <!-- 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/13597) <!-- Reviewable:end -->
|
|
|
@bors-servo retry |
bors-servo
added a commit
that referenced
this pull request
Oct 6, 2016
Provide the fetched data to fetch() consumers. <!-- 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/13597) <!-- Reviewable:end -->
|
@bors-servo clean force retry
|
bors-servo
added a commit
that referenced
this pull request
Oct 6, 2016
Provide the fetched data to fetch() consumers. <!-- 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/13597) <!-- Reviewable:end -->
|
|
|
Oh what the hell:
twice on servo-linux2 |
|
@Ms2ger disk full, please retry. |
|
@bors-servo retry
|
bors-servo
added a commit
that referenced
this pull request
Oct 6, 2016
Provide the fetched data to fetch() consumers. <!-- 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/13597) <!-- 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.
Ms2ger commentedOct 5, 2016
•
edited by larsbergstrom
This change is