mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:27:35 +00:00
LibJS: Keep handles on internal function while creating a class
It seems the stack search does not find all functions because they are kept in variants and other structs. This meant some function could be cleaned up while we were evaluating a class meaning it would fail/crash when attempting to run the functions.
This commit is contained in:
parent
5749d85534
commit
212c8dad5e
2 changed files with 16 additions and 12 deletions
|
@ -17,6 +17,7 @@
|
|||
#include <AK/Variant.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibJS/Forward.h>
|
||||
#include <LibJS/Heap/Handle.h>
|
||||
#include <LibJS/Runtime/Completion.h>
|
||||
#include <LibJS/Runtime/EnvironmentCoordinate.h>
|
||||
#include <LibJS/Runtime/FunctionKind.h>
|
||||
|
@ -1225,7 +1226,7 @@ public:
|
|||
|
||||
struct ClassFieldDefinition {
|
||||
ClassElementName name;
|
||||
ECMAScriptFunctionObject* initializer { nullptr };
|
||||
Handle<ECMAScriptFunctionObject> initializer;
|
||||
};
|
||||
|
||||
// We use the Completion also as a ClassStaticBlockDefinition Record.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue