Skip to content

Provide the fetched data to fetch() consumers.#13597

Merged
bors-servo merged 2 commits intomasterfrom
fetch
Oct 6, 2016
Merged

Provide the fetched data to fetch() consumers.#13597
bors-servo merged 2 commits intomasterfrom
fetch

Conversation

@Ms2ger
Copy link
Copy Markdown
Contributor

@Ms2ger Ms2ger commented Oct 5, 2016

This change is Reviewable

@highfive
Copy link
Copy Markdown

highfive commented Oct 5, 2016

Heads up! This PR modifies the following files:

  • @KiChjang: components/script/dom/request.rs, components/script/fetch.rs, components/script/dom/response.rs, components/script/body.rs

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 5, 2016
@Ms2ger
Copy link
Copy Markdown
Contributor Author

Ms2ger commented Oct 5, 2016

@bors-servo try

@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Trying commit 7ac1910 with merge e447d56...

bors-servo pushed a commit that referenced this pull request Oct 5, 2016
Provide the fetched data to fetch() consumers.

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());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as later comment.


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());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

};
},
Err(err) => promise.reject_error(cx, err),
if let Some(body) = object.take_body() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let body = match object.take_body() {
    Some(body) => body,
    None => return,
};

@jdm jdm assigned jdm and unassigned glennw Oct 5, 2016
@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Oct 5, 2016
@bors-servo
Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-wpt1

@highfive highfive added S-tests-failed The changes caused existing tests to fail. S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Oct 5, 2016
@Ms2ger
Copy link
Copy Markdown
Contributor Author

Ms2ger commented Oct 5, 2016

@bors-servo try

@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Trying commit c805e3b with merge 1a28907...

bors-servo pushed 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 -->
@bors-servo
Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel-wpt

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Oct 5, 2016
@jdm
Copy link
Copy Markdown
Member

jdm commented Oct 5, 2016

We probably need a compartment for the JSON case.

@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Oct 6, 2016
@Ms2ger
Copy link
Copy Markdown
Contributor Author

Ms2ger commented Oct 6, 2016

@bors-servo try

@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Trying commit 8f6a0b7 with merge 3ca06c1...

bors-servo pushed 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
Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-wpt1

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Oct 6, 2016
@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Testing commit cd47e21 with merge 113ef4c...

bors-servo pushed 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
Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-css

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Oct 6, 2016
@Ms2ger
Copy link
Copy Markdown
Contributor Author

Ms2ger commented Oct 6, 2016

@bors-servo retry

@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Testing commit cd47e21 with merge 0d25bc9...

bors-servo pushed 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 -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Oct 6, 2016
@larsbergstrom
Copy link
Copy Markdown
Contributor

@bors-servo clean force retry

  • infra buildbot restart

@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Testing commit cd47e21 with merge f1c3288...

bors-servo pushed 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
Copy link
Copy Markdown
Contributor

💔 Test failed - linux-dev

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Oct 6, 2016
@Ms2ger
Copy link
Copy Markdown
Contributor Author

Ms2ger commented Oct 6, 2016

Oh what the hell:

LLVM ERROR: IO failure on output stream.

twice on servo-linux2

@larsbergstrom ?

@larsbergstrom
Copy link
Copy Markdown
Contributor

@Ms2ger disk full, please retry.

@larsbergstrom
Copy link
Copy Markdown
Contributor

@bors-servo retry

  • infra

@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Testing commit cd47e21 with merge bd05aa2...

bors-servo pushed 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 -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Oct 6, 2016
@bors-servo
Copy link
Copy Markdown
Contributor

@bors-servo bors-servo merged commit cd47e21 into master Oct 6, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 6, 2016
@SimonSapin SimonSapin deleted the fetch branch November 3, 2016 10:30
@Ms2ger Ms2ger mentioned this pull request Nov 7, 2016
31 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants