mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-10 02:51:55 +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
|
@ -8,8 +8,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Optional.h>
|
||||
#include <LibGC/Ptr.h>
|
||||
#include <LibJS/Forward.h>
|
||||
#include <LibJS/Heap/GCPtr.h>
|
||||
#include <LibJS/Runtime/ArrayBuffer.h>
|
||||
#include <LibWasm/AbstractMachine/AbstractMachine.h>
|
||||
#include <LibWeb/Bindings/ExceptionOrUtils.h>
|
||||
|
@ -24,13 +24,13 @@ struct MemoryDescriptor {
|
|||
|
||||
class Memory : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(Memory, Bindings::PlatformObject);
|
||||
JS_DECLARE_ALLOCATOR(Memory);
|
||||
GC_DECLARE_ALLOCATOR(Memory);
|
||||
|
||||
public:
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<Memory>> construct_impl(JS::Realm&, MemoryDescriptor& descriptor);
|
||||
static WebIDL::ExceptionOr<GC::Ref<Memory>> construct_impl(JS::Realm&, MemoryDescriptor& descriptor);
|
||||
|
||||
WebIDL::ExceptionOr<u32> grow(u32 delta);
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<JS::ArrayBuffer>> buffer() const;
|
||||
WebIDL::ExceptionOr<GC::Ref<JS::ArrayBuffer>> buffer() const;
|
||||
|
||||
Wasm::MemoryAddress address() const { return m_address; }
|
||||
|
||||
|
@ -41,10 +41,10 @@ private:
|
|||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
WebIDL::ExceptionOr<void> reset_the_memory_buffer();
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<JS::ArrayBuffer>> create_a_memory_buffer(JS::VM&, JS::Realm&, Wasm::MemoryAddress);
|
||||
static WebIDL::ExceptionOr<GC::Ref<JS::ArrayBuffer>> create_a_memory_buffer(JS::VM&, JS::Realm&, Wasm::MemoryAddress);
|
||||
|
||||
Wasm::MemoryAddress m_address;
|
||||
mutable JS::GCPtr<JS::ArrayBuffer> m_buffer;
|
||||
mutable GC::Ptr<JS::ArrayBuffer> m_buffer;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue