LibWeb: Make Frame point weakly to Page

This patch makes Page weakable and allows page-less frames to exist.

Page is single-owner, and Frame is multiple-owner, so it's not sound
for Frame to assume its containing Page will stick around for its own
entire lifetime.

Fixes #3976.
This commit is contained in:
Andreas Kling 2020-11-12 18:23:05 +01:00
parent e445ff670d
commit 81add73955
Notes: sideshowbarker 2024-07-19 01:25:15 +09:00
12 changed files with 87 additions and 56 deletions

View file

@ -40,7 +40,7 @@ namespace Web {
class PageClient;
class Page {
class Page : public Weakable<Page> {
AK_MAKE_NONCOPYABLE(Page);
AK_MAKE_NONMOVABLE(Page);