mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 03:57:15 +02:00
LibJS+LibWeb: Return GC::Ptr from Value::as_if
This commit is contained in:
committed by
Shannon Booth
parent
9d1f727f43
commit
e95db70d2d
Notes:
github-actions[bot]
2026-02-27 16:21:14 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/e95db70d2d1 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8208 Reviewed-by: https://github.com/shannonbooth ✅
@@ -135,7 +135,7 @@ Optional<JS::PropertyDescriptor> cross_origin_get_own_property_helper(Variant<HT
|
||||
auto value = original_descriptor->value;
|
||||
|
||||
// 2. If IsCallable(value) is true, then set value to an anonymous built-in function, created in the current Realm Record, that performs the same steps as the IDL operation P on object O.
|
||||
if (auto* function = value->as_if<JS::FunctionObject>()) {
|
||||
if (auto function = value->as_if<JS::FunctionObject>()) {
|
||||
auto name = function->get_without_side_effects(vm.names.name).to_utf16_string_without_side_effects();
|
||||
auto length_property = function->get_without_side_effects(vm.names.length);
|
||||
auto length = length_property.is_int32() ? length_property.as_i32() : 0;
|
||||
|
||||
Reference in New Issue
Block a user