diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2021-05-17 12:06:48 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-17 09:41:26 +0200 |
commit | b1b0db946e9d1ec66660f70a4ec05e412bb331b6 (patch) | |
tree | 464e94f386992534954f6cbb3eeffa47d57e153e /Userland/Libraries | |
parent | adbf555e643477e3bf968a5ecb8cc2adc1effd47 (diff) | |
download | serenity-b1b0db946e9d1ec66660f70a4ec05e412bb331b6.zip |
LibJS: Default-initialize the current_node pointer member in CallFrame
Some parts of the code depend on this being nullptr without actually
initializing it, leading to odd random crashes.
e.g. `VM::call_internal`.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/VM.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/VM.h b/Userland/Libraries/LibJS/Runtime/VM.h index 78501e0b10..7cbac330fc 100644 --- a/Userland/Libraries/LibJS/Runtime/VM.h +++ b/Userland/Libraries/LibJS/Runtime/VM.h @@ -39,7 +39,7 @@ struct ScopeFrame { }; struct CallFrame { - const ASTNode* current_node; + const ASTNode* current_node { nullptr }; FlyString function_name; Value callee; Value this_value; |