Bug 186683 - DisplayRefreshMonitorMac should hold a weak pointer to WebPage.
Summary: DisplayRefreshMonitorMac should hold a weak pointer to WebPage.
Status: RESOLVED FIXED
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
URL:
Keywords: InRadar
Depends on: 186891
Blocks:
  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:


Attachments
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]
Patch
Comment 2 Radar WebKit Bug Importer 2018-06-15 10:49:31 PDT
<rdar://problem/41164502>
Comment 3 Brent Fulgham 2018-06-15 11:00:06 PDT
Comment on attachment 342828 [details]
Patch

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

r=me

> 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]
Patch

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

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>