Summary: | [WK2][Cocoa] Avoid null dereference in Fullscreen code. | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Brent Fulgham <bfulgham> | ||||
Component: | WebKit2 | Assignee: | Brent Fulgham <bfulgham> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bfulgham, eric.carlson, jeremyj-wk, jer.noble | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Brent Fulgham
2017-01-11 18:01:13 PST
Created attachment 298649 [details]
Patch
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. Committed r210619: <http://trac.webkit.org/changeset/210619> 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! |