mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 15:10:19 +00:00
LibGC: Expose deferred state publicly, annotate DeferGC for Swift
While we don't want arbitrary callers deferring GC, we do want deferral to be available to the Swift. In order for Swift to understand the RAII nature of DeferGC, we need to mark it as non-copyable.
This commit is contained in:
parent
32cf4d1e29
commit
726f2cfb11
Notes:
github-actions[bot]
2024-11-19 21:54:29 +00:00
Author: https://github.com/ADKaster Commit: https://github.com/LadybirdBrowser/ladybird/commit/726f2cfb11a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2386 Reviewed-by: https://github.com/alimpfard
2 changed files with 4 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Swift.h>
|
||||
#include <LibGC/Heap.h>
|
||||
|
||||
namespace GC {
|
||||
|
@ -25,6 +26,6 @@ public:
|
|||
|
||||
private:
|
||||
Heap& m_heap;
|
||||
};
|
||||
} SWIFT_NONCOPYABLE;
|
||||
|
||||
}
|
||||
|
|
|
@ -73,6 +73,8 @@ public:
|
|||
|
||||
void uproot_cell(Cell* cell);
|
||||
|
||||
bool is_gc_deferred() const { return m_gc_deferrals > 0; }
|
||||
|
||||
private:
|
||||
friend class MarkingVisitor;
|
||||
friend class GraphConstructorVisitor;
|
||||
|
|
Loading…
Reference in a new issue