mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-15 23:01:52 +00:00
LibGC+Everywhere: Factor out a LibGC from LibJS
Resulting in a massive rename across almost everywhere! Alongside the namespace change, we now have the following names: * JS::NonnullGCPtr -> GC::Ref * JS::GCPtr -> GC::Ptr * JS::HeapFunction -> GC::Function * JS::CellImpl -> GC::Cell * JS::Handle -> GC::Root
This commit is contained in:
parent
ce23efc5f6
commit
f87041bf3a
Notes:
github-actions[bot]
2024-11-15 13:50:17 +00:00
Author: https://github.com/shannonbooth
Commit: f87041bf3a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2345
1722 changed files with 9939 additions and 9906 deletions
|
@ -23,11 +23,11 @@ class Worker
|
|||
: public DOM::EventTarget
|
||||
, public HTML::AbstractWorker {
|
||||
WEB_PLATFORM_OBJECT(Worker, DOM::EventTarget);
|
||||
JS_DECLARE_ALLOCATOR(Worker);
|
||||
GC_DECLARE_ALLOCATOR(Worker);
|
||||
|
||||
public:
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<Worker>> create(String const& script_url, WorkerOptions const& options, DOM::Document& document);
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<Worker>> construct_impl(JS::Realm& realm, String const& script_url, WorkerOptions const& options)
|
||||
static WebIDL::ExceptionOr<GC::Ref<Worker>> create(String const& script_url, WorkerOptions const& options, DOM::Document& document);
|
||||
static WebIDL::ExceptionOr<GC::Ref<Worker>> construct_impl(JS::Realm& realm, String const& script_url, WorkerOptions const& options)
|
||||
{
|
||||
auto& window = verify_cast<HTML::Window>(realm.global_object());
|
||||
return Worker::create(script_url, options, window.associated_document());
|
||||
|
@ -36,11 +36,11 @@ public:
|
|||
WebIDL::ExceptionOr<void> terminate();
|
||||
|
||||
WebIDL::ExceptionOr<void> post_message(JS::Value message, StructuredSerializeOptions const&);
|
||||
WebIDL::ExceptionOr<void> post_message(JS::Value message, Vector<JS::Handle<JS::Object>> const& transfer);
|
||||
WebIDL::ExceptionOr<void> post_message(JS::Value message, Vector<GC::Root<JS::Object>> const& transfer);
|
||||
|
||||
virtual ~Worker() = default;
|
||||
|
||||
JS::GCPtr<MessagePort> outside_message_port() { return m_outside_port; }
|
||||
GC::Ptr<MessagePort> outside_message_port() { return m_outside_port; }
|
||||
|
||||
#undef __ENUMERATE
|
||||
#define __ENUMERATE(attribute_name, event_name) \
|
||||
|
@ -62,12 +62,12 @@ private:
|
|||
String m_script_url;
|
||||
WorkerOptions m_options;
|
||||
|
||||
JS::GCPtr<DOM::Document> m_document;
|
||||
JS::GCPtr<MessagePort> m_outside_port;
|
||||
GC::Ptr<DOM::Document> m_document;
|
||||
GC::Ptr<MessagePort> m_outside_port;
|
||||
|
||||
JS::GCPtr<WorkerAgent> m_agent;
|
||||
GC::Ptr<WorkerAgent> m_agent;
|
||||
|
||||
void run_a_worker(URL::URL& url, EnvironmentSettingsObject& outside_settings, JS::GCPtr<MessagePort> outside_port, WorkerOptions const& options);
|
||||
void run_a_worker(URL::URL& url, EnvironmentSettingsObject& outside_settings, GC::Ptr<MessagePort> outside_port, WorkerOptions const& options);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue