mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 03:25:13 +00:00
LibWeb: Reorganize definitions and includes to avoid circular references
This is necessary to avoid a circular reference when including Serializable.h in DOMException.h. This moves the definition of SerializationRecord, SerializationMemory, and DeserializationMemory into LibWeb/Forward.h so that Serializable.h only needs to include LibWeb/Forward.h.
This commit is contained in:
parent
4569b997a6
commit
53394230ca
Notes:
github-actions[bot]
2024-11-24 10:12:57 +00:00
Author: https://github.com/kennethmyhra Commit: https://github.com/LadybirdBrowser/ladybird/commit/53394230caa Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2532
7 changed files with 25 additions and 6 deletions
|
@ -6,8 +6,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <LibJS/Runtime/Realm.h>
|
||||
#include <LibWeb/HTML/StructuredSerialize.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/HTML/StructuredSerializeTypes.h>
|
||||
|
||||
namespace Web::Bindings {
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <LibWeb/Bindings/CryptoKeyPrototype.h>
|
||||
#include <LibWeb/Bindings/ExceptionOrUtils.h>
|
||||
#include <LibWeb/Crypto/CryptoKey.h>
|
||||
#include <LibWeb/HTML/StructuredSerialize.h>
|
||||
|
||||
namespace Web::Crypto {
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <LibWeb/Bindings/FilePrototype.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/FileAPI/File.h>
|
||||
#include <LibWeb/HTML/StructuredSerialize.h>
|
||||
#include <LibWeb/Infra/Strings.h>
|
||||
#include <LibWeb/MimeSniff/MimeType.h>
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/Bindings/PlatformObject.h>
|
||||
#include <LibWeb/FileAPI/FileList.h>
|
||||
#include <LibWeb/HTML/StructuredSerialize.h>
|
||||
|
||||
namespace Web::FileAPI {
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <LibWeb/Bindings/DOMQuadPrototype.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/Geometry/DOMQuad.h>
|
||||
#include <LibWeb/HTML/StructuredSerialize.h>
|
||||
|
||||
namespace Web::Geometry {
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
#include <AK/Vector.h>
|
||||
#include <LibIPC/Forward.h>
|
||||
#include <LibJS/Forward.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/HTML/StructuredSerializeTypes.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
|
||||
// Structured serialize is an entirely different format from IPC because:
|
||||
|
@ -22,10 +24,6 @@
|
|||
|
||||
namespace Web::HTML {
|
||||
|
||||
using SerializationRecord = Vector<u32>;
|
||||
using SerializationMemory = HashMap<GC::Root<JS::Value>, u32>;
|
||||
using DeserializationMemory = GC::MarkedVector<JS::Value>;
|
||||
|
||||
struct TransferDataHolder {
|
||||
Vector<u8> data;
|
||||
Vector<IPC::File> fds;
|
||||
|
|
17
Libraries/LibWeb/HTML/StructuredSerializeTypes.h
Normal file
17
Libraries/LibWeb/HTML/StructuredSerializeTypes.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Kenneth Myhra <kennethmyhra@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibGC/Forward.h>
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
using DeserializationMemory = GC::MarkedVector<JS::Value>;
|
||||
using SerializationRecord = Vector<u32>;
|
||||
using SerializationMemory = HashMap<GC::Root<JS::Value>, u32>;
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue