mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 02:29:21 +00:00
JSSpecCompiler: Restrict usage of NodeSubtreePointer
This class stores a non-owning raw pointer to a member of `Node`, so extra care is needed to ensure that referenced `Node`s will be alive by the time `NodeSubtreePointer` is used. Since we only need to use this class while traversing AST in `RecursiveASTVisitor`, access to class methods can be restricted using `Badge<RecursiveASTVisitor>`.
This commit is contained in:
parent
f789d26e37
commit
1c4cd34320
Notes:
sideshowbarker
2024-07-16 21:39:23 +09:00
Author: https://github.com/DanShaders
Commit: 1c4cd34320
Pull-request: https://github.com/SerenityOS/serenity/pull/20917
3 changed files with 8 additions and 4 deletions
|
@ -37,6 +37,9 @@ class Variable;
|
|||
class FunctionPointer;
|
||||
using FunctionPointerRef = NonnullRefPtr<FunctionPointer>;
|
||||
|
||||
// Compiler/GenericASTPass.h
|
||||
class RecursiveASTVisitor;
|
||||
|
||||
// Parser/SpecParser.h
|
||||
class AlgorithmStep;
|
||||
class AlgorithmStepList;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue