WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
184718
WebKit::DisplayLink maintains a strong reference to WebPageProxy, creating a reference cycle
https://bugs.webkit.org/show_bug.cgi?id=184718
Summary
WebKit::DisplayLink maintains a strong reference to WebPageProxy, creating a ...
Conrad Shultz
Reported
2018-04-17 17:02:39 PDT
WebKit::DisplayLink maintains a strong reference to WebPageProxy, creating a reference cycle.
Attachments
Patch
(2.15 KB, patch)
2018-04-17 17:25 PDT
,
Conrad Shultz
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Conrad Shultz
Comment 1
2018-04-17 17:03:31 PDT
<
rdar://problem/39468022
>
Conrad Shultz
Comment 2
2018-04-17 17:03:46 PDT
rdar://problem/39468022
Conrad Shultz
Comment 3
2018-04-17 17:04:11 PDT
<
rdar://problem/39468022
>
Conrad Shultz
Comment 4
2018-04-17 17:06:32 PDT
rdar://problem/39468022
Conrad Shultz
Comment 5
2018-04-17 17:07:45 PDT
rdar://problem/39468022
Conrad Shultz
Comment 6
2018-04-17 17:08:55 PDT
Oops...
Conrad Shultz
Comment 7
2018-04-17 17:25:23 PDT
Created
attachment 338167
[details]
Patch
Per Arne Vollan
Comment 8
2018-04-17 17:41:18 PDT
Comment on
attachment 338167
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=338167&action=review
Thanks for finding and fixing this!
> Source/WebKit/UIProcess/mac/DisplayLink.cpp:-39 > - : m_webPageProxy(webPageProxy)
The address of the WebPageProxy object is passed as a parameter to the function CVDisplayLinkSetOutputCallback below. This pointer is then passed as a void* parameter in the DisplayLink::displayLinkCallback method where it is casted to a WebPageProxy object. If it is guaranteed that we will not receive any callbacks after CVDisplayLinkStop is called in the destructor, then this patch is correct. Otherwise I think we have to use a weak pointer instead.
Tim Horton
Comment 9
2018-04-17 17:44:05 PDT
Comment on
attachment 338167
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=338167&action=review
>> Source/WebKit/UIProcess/mac/DisplayLink.cpp:-39 >> - : m_webPageProxy(webPageProxy) > > The address of the WebPageProxy object is passed as a parameter to the function CVDisplayLinkSetOutputCallback below. This pointer is then passed as a void* parameter in the DisplayLink::displayLinkCallback method where it is casted to a WebPageProxy object. If it is guaranteed that we will not receive any callbacks after CVDisplayLinkStop is called in the destructor, then this patch is correct. Otherwise I think we have to use a weak pointer instead.
Good point
WebKit Commit Bot
Comment 10
2018-04-17 20:07:16 PDT
Comment on
attachment 338167
[details]
Patch Clearing flags on attachment: 338167 Committed
r230747
: <
https://trac.webkit.org/changeset/230747
>
WebKit Commit Bot
Comment 11
2018-04-17 20:07:17 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug