mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibJS: Do not invoke Cell::vm in constructors before Cell is constructed
In a subclass of Cell, we cannot use Cell::vm() before the base Cell object itself is constructed. Use the Realm's VM instead. This was caught by UBSAN with vptr sanitation enabled.
This commit is contained in:
parent
3efe611dbf
commit
85e313077a
46 changed files with 97 additions and 97 deletions
|
@ -24,7 +24,7 @@ constexpr double const MIN_SAFE_INTEGER_VALUE { -(__builtin_exp2(53) - 1) };
|
|||
namespace JS {
|
||||
|
||||
NumberConstructor::NumberConstructor(Realm& realm)
|
||||
: NativeFunction(vm().names.Number.as_string(), *realm.intrinsics().function_prototype())
|
||||
: NativeFunction(realm.vm().names.Number.as_string(), *realm.intrinsics().function_prototype())
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue