mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 11:37:16 +02:00
LibJS: Make internal_define_own_property() save added property offset
...in `PropertyDescriptor`. This is required for the upcoming change that needs to know offset of newly added properties to set up inline caching.
This commit is contained in:
committed by
Andreas Kling
parent
ede6314cb6
commit
a54215c07d
Notes:
github-actions[bot]
2025-09-17 10:45:42 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/a54215c07d1 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6204
@@ -200,7 +200,8 @@ ThrowCompletionOr<Value> PromiseAnyRejectElementFunction::resolve_element()
|
||||
|
||||
// b. Perform ! DefinePropertyOrThrow(error, "errors", PropertyDescriptor { [[Configurable]]: true, [[Enumerable]]: false, [[Writable]]: true, [[Value]]: CreateArrayFromList(errors) }).
|
||||
auto errors_array = Array::create_from(realm, m_values->values());
|
||||
MUST(error->define_property_or_throw(vm.names.errors, { .value = errors_array, .writable = true, .enumerable = false, .configurable = true }));
|
||||
PropertyDescriptor descriptor { .value = errors_array, .writable = true, .enumerable = false, .configurable = true };
|
||||
MUST(error->define_property_or_throw(vm.names.errors, descriptor));
|
||||
|
||||
// c. Return ? Call(promiseCapability.[[Reject]], undefined, « error »).
|
||||
return JS::call(vm, *m_capability->reject(), js_undefined(), error);
|
||||
|
||||
Reference in New Issue
Block a user