mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 09:09:43 +00:00
WebWorker: Ensure global object has URL set before fetching
As explained by the comment in the code. I believe this to be a spec issue, which I will report.
This commit is contained in:
parent
40d21e343f
commit
9aabe88795
Notes:
github-actions[bot]
2025-05-24 13:52:44 +00:00
Author: https://github.com/shannonbooth
Commit: 9aabe88795
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4868
1 changed files with 5 additions and 0 deletions
|
@ -245,6 +245,11 @@ void WorkerHost::run(GC::Ref<Web::Page> page, Web::HTML::TransferDataHolder mess
|
|||
};
|
||||
auto on_complete = Web::HTML::create_on_fetch_script_complete(inside_settings->vm().heap(), move(on_complete_function));
|
||||
|
||||
// AD-HOC: Fetching a script performs actions such as for blobs checking that they are on the same partition
|
||||
// based on origin. However, this is performed before the consume body algorithm is run, where
|
||||
// this URL for that worker is set. As a workaround, set the URL upfront.
|
||||
worker_global_scope->set_url(m_url);
|
||||
|
||||
// 14. Obtain script by switching on the value of options's type member:
|
||||
// classic: Fetch a classic worker script given url, outside settings, destination, inside settings,
|
||||
// and with onComplete and performFetch as defined below.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue