mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
LibWeb: Add facilities to serialize EnvironmentSettingsObjects
This will be used to transfer information about the parent context to DedicatedWorkers and future out-of-process Worker/Worklet implementations for fetching purposes. In order to properly check same-origin and other policies, we need to know more about the outside settings than we were previously passing to the WebWorker process.
This commit is contained in:
committed by
Andreas Kling
parent
c79bac70f4
commit
4d22358e05
@@ -12,6 +12,7 @@
|
||||
#include <LibWeb/HTML/EventLoop/EventLoop.h>
|
||||
#include <LibWeb/HTML/Origin.h>
|
||||
#include <LibWeb/HTML/Scripting/ModuleMap.h>
|
||||
#include <LibWeb/HTML/Scripting/SerializedEnvironmentSettingsObject.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
@@ -40,11 +41,6 @@ struct Environment {
|
||||
bool execution_ready { false };
|
||||
};
|
||||
|
||||
enum class CanUseCrossOriginIsolatedAPIs {
|
||||
No,
|
||||
Yes,
|
||||
};
|
||||
|
||||
enum class RunScriptDecision {
|
||||
Run,
|
||||
DoNotRun,
|
||||
@@ -115,6 +111,8 @@ struct EnvironmentSettingsObject
|
||||
|
||||
void disallow_further_import_maps();
|
||||
|
||||
SerializedEnvironmentSettingsObject serialize();
|
||||
|
||||
protected:
|
||||
explicit EnvironmentSettingsObject(NonnullOwnPtr<JS::ExecutionContext>);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user