mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibWeb: Add GC finalizer to Layout::ImageBox
It's not safe to unregister ImageBox from the browsing context in the destructor (since the browsing context may have already been swept and destroyed).
This commit is contained in:
parent
c877eb47a2
commit
1885fe529f
Notes:
sideshowbarker
2024-07-17 05:16:31 +09:00
Author: https://github.com/awesomekling
Commit: 1885fe529f
2 changed files with 11 additions and 2 deletions
|
@ -12,7 +12,7 @@
|
|||
|
||||
namespace Web::Layout {
|
||||
|
||||
class ImageBox
|
||||
class ImageBox final
|
||||
: public ReplacedBox
|
||||
, public HTML::BrowsingContext::ViewportClient {
|
||||
JS_CELL(ImageBox, ReplacedBox);
|
||||
|
@ -37,6 +37,9 @@ private:
|
|||
// ^BrowsingContext::ViewportClient
|
||||
virtual void browsing_context_did_set_viewport_rect(Gfx::IntRect const&) final;
|
||||
|
||||
// ^JS::Cell
|
||||
virtual void finalize() override;
|
||||
|
||||
int preferred_width() const;
|
||||
int preferred_height() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue