mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Auto merge of #23183 - krk:fix-23144, r=asajeffrey
Replace panic with warn in DocumentLoader.finish_load. Fix panic on broken script URL with an onerror handler that rewrites the document. <!-- Please describe your changes on the following line: --> --- <!-- 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 #23144 <!-- 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/23183) <!-- Reviewable:end -->
This commit is contained in:
commit
db9300d3e6
1 changed files with 6 additions and 2 deletions
|
@ -167,8 +167,12 @@ impl DocumentLoader {
|
|||
.blocking_loads
|
||||
.iter()
|
||||
.position(|unfinished| *unfinished == *load);
|
||||
self.blocking_loads
|
||||
.remove(idx.unwrap_or_else(|| panic!("unknown completed load {:?}", load)));
|
||||
match idx {
|
||||
Some(i) => {
|
||||
self.blocking_loads.remove(i);
|
||||
},
|
||||
None => warn!("unknown completed load {:?}", load),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_blocked(&self) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue