Bug 186683 - DisplayRefreshMonitorMac should hold a weak pointer to WebPage.
Summary: DisplayRefreshMonitorMac should hold a weak pointer to WebPage.
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Per Arne Vollan
Keywords: InRadar
Depends on: 186891
  Show dependency treegraph
Reported: 2018-06-15 10:42 PDT by Per Arne Vollan
Modified: 2018-08-09 08:50 PDT (History)
4 users (show)

See Also:

Patch (3.12 KB, patch)
2018-06-15 10:48 PDT, Per Arne Vollan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Per Arne Vollan 2018-06-15 10:42:40 PDT
Instead of DisplayRefreshMonitorMac having a RefPtr to WebPage, it should have a weak pointer. Having a RefPtr could in theory create reference cycles. I have not seen any cases of this, but I think it would be better design to hold a weak pointer.
Comment 1 Per Arne Vollan 2018-06-15 10:48:40 PDT
Created attachment 342828 [details]
Comment 2 Radar WebKit Bug Importer 2018-06-15 10:49:31 PDT
Comment 3 Brent Fulgham 2018-06-15 11:00:06 PDT
Comment on attachment 342828 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=342828&action=review


> Source/WebKit/ChangeLog:10
> +        observed in practice, but it is safer to use a weak pointer.

Good point!
Comment 4 Per Arne Vollan 2018-06-15 11:05:35 PDT
Comment on attachment 342828 [details]

Thanks for reviewing!
Comment 5 WebKit Commit Bot 2018-06-15 11:47:39 PDT
Comment on attachment 342828 [details]

Clearing flags on attachment: 342828

Committed r232884: <https://trac.webkit.org/changeset/232884>
Comment 6 WebKit Commit Bot 2018-06-15 11:47:40 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 WebKit Commit Bot 2018-06-21 13:21:10 PDT
Re-opened since this is blocked by bug 186891
Comment 8 Per Arne Vollan 2018-08-09 08:50:41 PDT
Committed r234725: <https://trac.webkit.org/changeset/234725/webkit>