mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +00:00
WebWorker: Log URL and reason for Worker script load failure
This commit is contained in:
parent
d81c531322
commit
9f01e0f826
Notes:
sideshowbarker
2024-07-17 00:57:24 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/9f01e0f826 Pull-request: https://github.com/SerenityOS/serenity/pull/22168
1 changed files with 2 additions and 2 deletions
|
@ -132,7 +132,7 @@ void DedicatedWorkerHost::run()
|
|||
};
|
||||
auto perform_fetch = Web::HTML::create_perform_the_fetch_hook(inner_settings->heap(), move(perform_fetch_function));
|
||||
|
||||
auto on_complete_function = [inner_settings, worker_global_scope, outside_port = m_outside_port](JS::GCPtr<Web::HTML::Script> script) {
|
||||
auto on_complete_function = [inner_settings, worker_global_scope, outside_port = m_outside_port, url = m_url](JS::GCPtr<Web::HTML::Script> script) {
|
||||
auto& realm = inner_settings->realm();
|
||||
// 1. If script is null or if script's error to rethrow is non-null, then:
|
||||
if (!script || !script->error_to_rethrow().is_null()) {
|
||||
|
@ -141,7 +141,7 @@ void DedicatedWorkerHost::run()
|
|||
// FIXME 2. Run the environment discarding steps for inside settings.
|
||||
|
||||
// 3. Abort these steps.
|
||||
dbgln("Didn't get my script :(");
|
||||
dbgln("DedicatedWorkerHost: Unable to fetch script {} because {}", url, script ? script->error_to_rethrow().to_string_without_side_effects() : "script was null"_string);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue