mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-09 12:42:54 +00:00
LibWeb: Unload fonts when adopted style sheet is removed
Add missing unloading step that we do for regular style sheets but mistakenly missed for adopted style sheets.
This commit is contained in:
parent
0d92cd1f36
commit
cf57efd252
Notes:
github-actions[bot]
2025-01-10 16:13:44 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: cf57efd252
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3215
3 changed files with 15 additions and 4 deletions
|
@ -48,8 +48,13 @@ JS::ThrowCompletionOr<bool> ObservableArray::internal_set(JS::PropertyKey const&
|
|||
|
||||
JS::ThrowCompletionOr<bool> ObservableArray::internal_delete(JS::PropertyKey const& property_key)
|
||||
{
|
||||
if (property_key.is_number() && m_on_delete_an_indexed_value)
|
||||
TRY(Bindings::throw_dom_exception_if_needed(vm(), [&] { return m_on_delete_an_indexed_value->function()(); }));
|
||||
if (property_key.is_number() && m_on_delete_an_indexed_value) {
|
||||
auto maybe_value_and_attributes = indexed_properties().get(property_key.as_number());
|
||||
JS::Value deleted_value;
|
||||
if (maybe_value_and_attributes.has_value())
|
||||
deleted_value = maybe_value_and_attributes->value;
|
||||
TRY(Bindings::throw_dom_exception_if_needed(vm(), [&] { return m_on_delete_an_indexed_value->function()(deleted_value); }));
|
||||
}
|
||||
return JS::Array::internal_delete(property_key);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue