mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibGC: Delete operators ! and bool from GC::Ref
The GC::Ref smart pointer is always non-null, so there's no need for it to be convertible to bool. This exposed a small number of unnecessary null checks which we remove.
This commit is contained in:
parent
e4e18ca84b
commit
3fb678b376
Notes:
github-actions[bot]
2025-10-29 20:22:34 +00:00
Author: https://github.com/awesomekling
Commit: 3fb678b376
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6629
3 changed files with 3 additions and 2 deletions
|
|
@ -1344,7 +1344,6 @@ static Value instantiate_ordinary_function_expression(Interpreter& interpreter,
|
|||
|
||||
auto environment = GC::Ref { *interpreter.running_execution_context().lexical_environment };
|
||||
if (has_own_name) {
|
||||
VERIFY(environment);
|
||||
environment = new_declarative_environment(*environment);
|
||||
MUST(environment->create_immutable_binding(interpreter.vm(), own_name, false));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue