mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 12:20:00 +01: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
|
|
@ -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…
Reference in New Issue
Block a user