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
Use fetch infrastructure to load external scripts #12472
Conversation
Heads up! This PR modifies the following files:
|
@bors-servo try |
Make text decorations have the same color as the text if no shadows are present Fixes #9186. r? @Ms2ger <!-- 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/12472) <!-- Reviewable:end -->
That's a weird PR title. |
💔 Test failed - mac-rel-css |
b6a5ac6
to
de36d2c
Compare
@bors-servo try |
Use fetch infrastructure to load external scripts Fixes #9186. r? @Ms2ger <!-- 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/12472) <!-- Reviewable:end -->
💔 Test failed - mac-rel-css |
de36d2c
to
a51bb00
Compare
@bors-servo try |
Use fetch infrastructure to load external scripts Fixes #9186. r? @Ms2ger <!-- 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/12472) <!-- Reviewable:end -->
💔 Test failed - mac-rel-wpt |
Huh, looks like there's a lot more infrastructure to work on. |
a51bb00
to
9208353
Compare
@bors-servo try |
6fa5654
to
31e51a9
Compare
@bors-servo try |
Use fetch infrastructure to load external scripts Fixes #9186. <!-- 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/12472) <!-- Reviewable:end -->
☀️ Test successful - arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows-dev |
}; | ||
|
||
if self.is_network_error() { | ||
return Err(NetworkError::Internal("Cannot extract metadata from network error".to_string())); | ||
if let Some(ref mut m) = metadata { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move the initialization into the appropriate if let
block earlier.
Metadata::default(url.clone()) | ||
Some(Metadata::default(url.clone())) | ||
} else if self.is_network_error() { | ||
return Err(NetworkError::Internal("Cannot extract metadata from network error".to_owned())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's have a separate if
block for this check before we check self.url
.
} else { | ||
match metadata { | ||
Some(m) => Ok(FetchMetadata::Unfiltered(m)), | ||
None => Err(NetworkError::Internal("No url found in response".to_owned())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather make this an unreachable!()
, because we shouldn't be able to have a URL-less response with no internal response.
31e51a9
to
4f67cd8
Compare
4f67cd8
to
2b2ac45
Compare
2b2ac45
to
6fbd2aa
Compare
Comments addressed. |
@bors-servo: r+ |
📌 Commit 6fbd2aa has been approved by |
Use fetch infrastructure to load external scripts Fixes #9186. <!-- 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/12472) <!-- Reviewable:end -->
☀️ Test successful - arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows-dev |
Fixes #9186.
This change is