mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +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
|
@ -15,14 +15,14 @@ namespace JS {
|
|||
|
||||
class ShadowRealm final : public Object {
|
||||
JS_OBJECT(ShadowRealm, Object);
|
||||
JS_DECLARE_ALLOCATOR(ShadowRealm);
|
||||
GC_DECLARE_ALLOCATOR(ShadowRealm);
|
||||
|
||||
public:
|
||||
virtual ~ShadowRealm() override = default;
|
||||
|
||||
[[nodiscard]] Realm const& shadow_realm() const { return *m_shadow_realm; }
|
||||
[[nodiscard]] Realm& shadow_realm() { return *m_shadow_realm; }
|
||||
void set_shadow_realm(NonnullGCPtr<Realm> realm) { m_shadow_realm = realm; }
|
||||
void set_shadow_realm(GC::Ref<Realm> realm) { m_shadow_realm = realm; }
|
||||
|
||||
private:
|
||||
ShadowRealm(Object& prototype);
|
||||
|
@ -30,7 +30,7 @@ private:
|
|||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
// 3.5 Properties of ShadowRealm Instances, https://tc39.es/proposal-shadowrealm/#sec-properties-of-shadowrealm-instances
|
||||
GCPtr<Realm> m_shadow_realm; // [[ShadowRealm]]
|
||||
GC::Ptr<Realm> m_shadow_realm; // [[ShadowRealm]]
|
||||
};
|
||||
|
||||
ThrowCompletionOr<void> copy_name_and_length(VM&, FunctionObject& function, FunctionObject& target, Optional<StringView> prefix = {}, Optional<unsigned> arg_count = {});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue