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

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

Merged
merged 2 commits into from Oct 6, 2016
Merged

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

merged 2 commits into from Oct 6, 2016

Conversation

@Ms2ger
Copy link
Contributor

Ms2ger commented Oct 5, 2016

This change is Reviewable

@highfive
Copy link

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
@Ms2ger
Copy link
Contributor Author

Ms2ger commented Oct 5, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Oct 5, 2016

Trying commit 7ac1910 with merge e447d56...

bors-servo added a commit that referenced this pull request Oct 5, 2016
Provide the fetched data to fetch() consumers.
@@ -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.

@jdm

jdm Oct 5, 2016

Member

Same as later comment.

@@ -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.

@jdm

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.

@jdm

jdm Oct 5, 2016

Member

Is this necessary?

This comment has been minimized.

@Ms2ger

Ms2ger Oct 6, 2016

Author Contributor

Yes.

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

This comment has been minimized.

@jdm

jdm Oct 5, 2016

Member
let body = match object.take_body() {
    Some(body) => body,
    None => return,
};
@jdm jdm assigned jdm and unassigned glennw Oct 5, 2016
@bors-servo
Copy link
Contributor

bors-servo commented Oct 5, 2016

💔 Test failed - mac-rel-wpt1

@Ms2ger
Copy link
Contributor Author

Ms2ger commented Oct 5, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Oct 5, 2016

Trying commit c805e3b with merge 1a28907...

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

bors-servo commented Oct 5, 2016

💔 Test failed - linux-rel-wpt

@jdm
Copy link
Member

jdm commented Oct 5, 2016

We probably need a compartment for the JSON case.

@highfive highfive removed the S-tests-failed label Oct 6, 2016
@Ms2ger
Copy link
Contributor Author

Ms2ger commented Oct 6, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Oct 6, 2016

Trying commit 8f6a0b7 with merge 3ca06c1...

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
Copy link
Contributor

bors-servo commented Oct 6, 2016

💔 Test failed - mac-rel-wpt1

@bors-servo
Copy link
Contributor

bors-servo commented Oct 6, 2016

Testing commit cd47e21 with merge 113ef4c...

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
Copy link
Contributor

bors-servo commented Oct 6, 2016

💔 Test failed - mac-rel-css

@Ms2ger
Copy link
Contributor Author

Ms2ger commented Oct 6, 2016

@bors-servo retry

@bors-servo
Copy link
Contributor

bors-servo commented Oct 6, 2016

Testing commit cd47e21 with merge 0d25bc9...

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 -->
@larsbergstrom
Copy link
Contributor

larsbergstrom commented Oct 6, 2016

@bors-servo clean force retry

  • infra buildbot restart
@bors-servo
Copy link
Contributor

bors-servo commented Oct 6, 2016

Testing commit cd47e21 with merge f1c3288...

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
Copy link
Contributor

bors-servo commented Oct 6, 2016

💔 Test failed - linux-dev

@Ms2ger
Copy link
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
Contributor

larsbergstrom commented Oct 6, 2016

@Ms2ger disk full, please retry.

@larsbergstrom
Copy link
Contributor

larsbergstrom commented Oct 6, 2016

@bors-servo retry

  • infra
@bors-servo
Copy link
Contributor

bors-servo commented Oct 6, 2016

Testing commit cd47e21 with merge bd05aa2...

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
Copy link
Contributor

bors-servo commented Oct 6, 2016

@bors-servo bors-servo merged commit cd47e21 into master Oct 6, 2016
3 of 4 checks passed
3 of 4 checks passed
dependency-ci Failed dependency checks
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@SimonSapin SimonSapin deleted the fetch branch Nov 3, 2016
@Ms2ger Ms2ger mentioned this pull request Nov 7, 2016
31 of 31 tasks complete
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.