diff options
author | Delan Azabani <dazabani@igalia.com> | 2023-09-06 17:52:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-06 09:52:37 +0000 |
commit | c3c6c95a9b1fd81d740aa8a300174fbbead8f38c (patch) | |
tree | caa4ac1773d0cd1e94160cd17abc3f163e94cbde /components/net/fetch/methods.rs | |
parent | 1b6351486cb7c61f45f6e3c395e73c1582cddf69 (diff) | |
download | servo-c3c6c95a9b1fd81d740aa8a300174fbbead8f38c.tar.gz servo-c3c6c95a9b1fd81d740aa8a300174fbbead8f38c.zip |
constellation: crash to a new “sad tab” error page (#30290)
* constellation: crash to a new “sad tab” page
* check in resources/crash.html
* use a separate enum variant instead of keying on reason
* fmt + tidy
* rename Resource::Crash to Resource::CrashHTML
* clean up crash page and add details (reason + backtrace)
* avoid repeating crash errors in script::script_thread warn log
* make new LoadData init more idiomatic
* clarify comments and new fields
* fix doc comment style
Diffstat (limited to 'components/net/fetch/methods.rs')
-rw-r--r-- | components/net/fetch/methods.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/components/net/fetch/methods.rs b/components/net/fetch/methods.rs index f11a203b3bc..cb32e7a62d2 100644 --- a/components/net/fetch/methods.rs +++ b/components/net/fetch/methods.rs @@ -195,6 +195,13 @@ pub async fn main_fetch( // Step 1. let mut response = None; + // Servo internal: return a crash error when a crash error page is needed + if let Some(ref details) = request.crash { + response = Some(Response::network_error(NetworkError::Crash( + details.clone(), + ))); + } + // Step 2. if request.local_urls_only { if !matches!( |