mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 17:44:56 +09:00
LibWeb: Check actual WorkerGlobalScope subclass to set top level origin
Checking against DedicatedWorkerHost was probably a typo.
This commit is contained in:
parent
62592c19fe
commit
4af0daf3eb
Notes:
github-actions[bot]
2025-05-18 23:51:16 +00:00
Author: https://github.com/ADKaster
Commit: 4af0daf3eb
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4806
Reviewed-by: https://github.com/shannonbooth
Reviewed-by: https://github.com/trflynn89
1 changed files with 2 additions and 2 deletions
|
@ -6,10 +6,10 @@
|
|||
*/
|
||||
|
||||
#include <LibWeb/Bindings/PrincipalHostDefined.h>
|
||||
#include <LibWeb/HTML/DedicatedWorkerGlobalScope.h>
|
||||
#include <LibWeb/HTML/Scripting/WorkerEnvironmentSettingsObject.h>
|
||||
#include <LibWeb/HTML/WorkerGlobalScope.h>
|
||||
#include <LibWeb/HighResolutionTime/TimeOrigin.h>
|
||||
#include <WebWorker/DedicatedWorkerHost.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
@ -36,7 +36,7 @@ GC::Ref<WorkerEnvironmentSettingsObject> WorkerEnvironmentSettingsObject::setup(
|
|||
|
||||
// FIXME: 5. Set settings object's id to a new unique opaque string, creation URL to worker global scope's url, top-level creation URL to null, target browsing context to null, and active service worker to null.
|
||||
// 6. If worker global scope is a DedicatedWorkerGlobalScope object, then set settings object's top-level origin to outside settings's top-level origin.
|
||||
if (is<WebWorker::DedicatedWorkerHost>(worker)) {
|
||||
if (is<DedicatedWorkerGlobalScope>(worker)) {
|
||||
settings_object->top_level_origin = outside_settings.top_level_origin;
|
||||
}
|
||||
// FIXME: 7. Otherwise, set settings object's top-level origin to an implementation-defined value.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue