mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
LibJS: Remove ExecutionContext::function_name field
Instead of having ExecutionContext track function names separately, we give FunctionObject a virtual function that returns an appropriate name string for use in call stacks.
This commit is contained in:
committed by
Andreas Kling
parent
e967631763
commit
4c7ffc0552
Notes:
github-actions[bot]
2025-10-29 20:22:09 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/4c7ffc05528 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6629
@@ -694,7 +694,6 @@ void ECMAScriptFunctionObject::prepare_for_ordinary_call(VM& vm, ExecutionContex
|
||||
|
||||
// 3. Set the Function of calleeContext to F.
|
||||
callee_context.function = this;
|
||||
callee_context.function_name = m_name_string;
|
||||
|
||||
// 4. Let calleeRealm be F.[[Realm]].
|
||||
// 5. Set the Realm of calleeContext to calleeRealm.
|
||||
@@ -933,4 +932,9 @@ ECMAScriptFunctionObject::ClassData& ECMAScriptFunctionObject::ensure_class_data
|
||||
return *m_class_data;
|
||||
}
|
||||
|
||||
Utf16String ECMAScriptFunctionObject::name_for_call_stack() const
|
||||
{
|
||||
return m_name_string->utf16_string();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user