mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Remove ability to override MessagePort's primary interface
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
This hack no longer has any users.
This commit is contained in:
parent
d471b52b0e
commit
f6f31fe215
Notes:
github-actions[bot]
2025-07-18 14:10:23 +00:00
Author: https://github.com/trflynn89
Commit: f6f31fe215
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5492
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/shannonbooth
2 changed files with 6 additions and 9 deletions
|
@ -38,14 +38,13 @@ static HashTable<GC::RawPtr<MessagePort>>& all_message_ports()
|
|||
return ports;
|
||||
}
|
||||
|
||||
GC::Ref<MessagePort> MessagePort::create(JS::Realm& realm, HTML::TransferType primary_interface)
|
||||
GC::Ref<MessagePort> MessagePort::create(JS::Realm& realm)
|
||||
{
|
||||
return realm.create<MessagePort>(realm, primary_interface);
|
||||
return realm.create<MessagePort>(realm);
|
||||
}
|
||||
|
||||
MessagePort::MessagePort(JS::Realm& realm, HTML::TransferType primary_interface)
|
||||
MessagePort::MessagePort(JS::Realm& realm)
|
||||
: DOM::EventTarget(realm)
|
||||
, m_primary_interface(primary_interface)
|
||||
{
|
||||
all_message_ports().set(this);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ class MessagePort final
|
|||
GC_DECLARE_ALLOCATOR(MessagePort);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static GC::Ref<MessagePort> create(JS::Realm&, HTML::TransferType primary_interface = HTML::TransferType::MessagePort);
|
||||
[[nodiscard]] static GC::Ref<MessagePort> create(JS::Realm&);
|
||||
|
||||
static void for_each_message_port(Function<void(MessagePort&)>);
|
||||
|
||||
|
@ -61,14 +61,14 @@ public:
|
|||
// ^Transferable
|
||||
virtual WebIDL::ExceptionOr<void> transfer_steps(HTML::TransferDataEncoder&) override;
|
||||
virtual WebIDL::ExceptionOr<void> transfer_receiving_steps(HTML::TransferDataDecoder&) override;
|
||||
virtual HTML::TransferType primary_interface() const override { return m_primary_interface; }
|
||||
virtual HTML::TransferType primary_interface() const override { return HTML::TransferType::MessagePort; }
|
||||
|
||||
void set_worker_event_target(GC::Ref<DOM::EventTarget>);
|
||||
|
||||
WebIDL::ExceptionOr<void> message_port_post_message_steps(GC::Ptr<MessagePort> target_port, JS::Value message, StructuredSerializeOptions const& options);
|
||||
|
||||
private:
|
||||
explicit MessagePort(JS::Realm&, HTML::TransferType primary_interface);
|
||||
explicit MessagePort(JS::Realm&);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void finalize() override;
|
||||
|
@ -81,8 +81,6 @@ private:
|
|||
ErrorOr<void> send_message_on_transport(SerializedTransferRecord const&);
|
||||
void read_from_transport();
|
||||
|
||||
HTML::TransferType m_primary_interface { HTML::TransferType::MessagePort };
|
||||
|
||||
// The HTML spec implies(!) that this is MessagePort.[[RemotePort]]
|
||||
GC::Ptr<MessagePort> m_remote_port;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue