Bug 186683

Summary: DisplayRefreshMonitorMac should hold a weak pointer to WebPage.
Product: WebKit Reporter: Per Arne Vollan <pvollan>
Component: WebKit Misc.Assignee: Per Arne Vollan <pvollan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 186891    
Bug Blocks:    
Attachments:
Description Flags
Patch none

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>