mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibJS: Handle both const and non-const Ts in Handle<T>::create()
Again, the const-ness only really involves Heap-internal metadata, so the callers shouldn't care about mutations here.
This commit is contained in:
committed by
Linus Groh
parent
74e93a46ea
commit
70a2ca7fc0
Notes:
sideshowbarker
2024-07-17 16:23:55 +09:00
Author: https://github.com/mattco98 Commit: https://github.com/SerenityOS/serenity/commit/70a2ca7fc0 Pull-request: https://github.com/SerenityOS/serenity/pull/17620 Issue: https://github.com/SerenityOS/serenity/issues/16988 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/linusg
@@ -2121,7 +2121,7 @@ Vector<JS::Handle<HTML::BrowsingContext>> Document::list_of_descendant_browsing_
|
||||
// of this document's browsing context.
|
||||
if (browsing_context()) {
|
||||
browsing_context()->for_each_in_subtree([&](auto& context) {
|
||||
list.append(JS::make_handle(const_cast<HTML::BrowsingContext&>(context)));
|
||||
list.append(JS::make_handle(context));
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user