WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
166957
[WK2][Cocoa] Avoid null dereference in Fullscreen code.
https://bugs.webkit.org/show_bug.cgi?id=166957
Summary
[WK2][Cocoa] Avoid null dereference in Fullscreen code.
Brent Fulgham
Reported
2017-01-11 18:01:13 PST
Crash tracing statistics indicate that the 'WebVideoFullScreenManager::didSetupFullscreen' encounters stability issues under certain conditions. We do not have a reproducible test case showing this behavior, but code inspection indicates that the page values in the completion Block were not being referenced consistently with other methods in the same class. It also did not account for the possibility that the page object had been cleared between starting the dispatch and when the block actually runs.
Attachments
Patch
(1.66 KB, patch)
2017-01-11 18:04 PST
,
Brent Fulgham
eric.carlson
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Brent Fulgham
Comment 1
2017-01-11 18:01:29 PST
<
rdar://problem/27745004
>
Brent Fulgham
Comment 2
2017-01-11 18:04:18 PST
Created
attachment 298649
[details]
Patch
Eric Carlson
Comment 3
2017-01-11 18:08:49 PST
Comment on
attachment 298649
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=298649&action=review
> Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.mm:333 > + if (strongThis->m_page) > + strongThis->m_page->send(Messages::WebVideoFullscreenManagerProxy::EnterFullscreen(contextId), strongThis->m_page->pageID());
Nit: "strongThis" is only really necessary for the "if". Leaving the second line with implied "this" looks cleaner IMO. It would probably be even better to return early if m_page is NULL.
Brent Fulgham
Comment 4
2017-01-11 21:04:39 PST
Committed
r210619
: <
http://trac.webkit.org/changeset/210619
>
Brent Fulgham
Comment 5
2017-01-11 21:06:48 PST
Comment on
attachment 298649
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=298649&action=review
>> Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.mm:333 >> + strongThis->m_page->send(Messages::WebVideoFullscreenManagerProxy::EnterFullscreen(contextId), strongThis->m_page->pageID()); > > Nit: "strongThis" is only really necessary for the "if". Leaving the second line with implied "this" looks cleaner IMO. It would probably be even better to return early if m_page is NULL.
OK!
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