Summary: | REGRESSION (r271970): [iOS] ASSERTION FAILED: Completion handler should always be called under WebKit::VideoFullscreenManagerProxy::forEachSession | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ryan Haddad <ryanhaddad> | ||||||
Component: | New Bugs | Assignee: | Kate Cheney <katherine_cheney> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | cdumez, eric.carlson, ews-watchlist, glenn, jer.noble, katherine_cheney, peng.liu6, philipj, sergio, webkit-bot-watchers-bugzilla, webkit-bug-importer, youennf | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | Other | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=220741 | ||||||||
Attachments: |
|
Description
Ryan Haddad
2021-02-03 10:45:23 PST
This seems to have started with https://trac.webkit.org/changeset/271970/webkit Created attachment 419171 [details]
Patch
Comment on attachment 419171 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=419171&action=review > Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:756 > + completionHandler(); Seems odd to call the completion handler before calling requestFullscreenMode.. Created attachment 419178 [details]
Patch
(In reply to Chris Dumez from comment #4) > Comment on attachment 419171 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=419171&action=review > > > Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:756 > > + completionHandler(); > > Seems odd to call the completion handler before calling > requestFullscreenMode.. You’re right. That got me thinking that I should change the name also because requestFullscreenModeWithCallback makes it sound like the completion handler works for cases other than requesting VideoFullscreenModeNone, but it does not. Comment on attachment 419171 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=419171&action=review >>> Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:756 >>> + completionHandler(); >> >> Seems odd to call the completion handler before calling requestFullscreenMode.. > > You’re right. That got me thinking that I should change the name also because requestFullscreenModeWithCallback makes it sound like the completion handler works for cases other than requesting VideoFullscreenModeNone, but it does not. Maybe we can reorganize the code to avoid the oddness. Like below: ``` if (...) { m_closeCompletionHandlers.append(WTFMove(completionHandler)); requestFullscreenMode(contextId, mode, finishedWithMedia); return; } completionHandler(); ``` Comment on attachment 419171 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=419171&action=review >>>> Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:756 >>>> + completionHandler(); >>> >>> Seems odd to call the completion handler before calling requestFullscreenMode.. >> >> You’re right. That got me thinking that I should change the name also because requestFullscreenModeWithCallback makes it sound like the completion handler works for cases other than requesting VideoFullscreenModeNone, but it does not. > > Maybe we can reorganize the code to avoid the oddness. Like below: > ``` > if (...) { > m_closeCompletionHandlers.append(WTFMove(completionHandler)); > requestFullscreenMode(contextId, mode, finishedWithMedia); > return; > } > > completionHandler(); > ``` Oh, just saw the new patch! :-) Comment on attachment 419178 [details]
Patch
LGTM.
Maybe an enum could be used for finishedMedia in a follow-up.
commit-queue failed to commit attachment 419178 [details] to WebKit repository. To retry, please set cq+ flag again.
Committed r272425: <https://trac.webkit.org/changeset/272425> All reviewed patches have been landed. Closing bug and clearing flags on attachment 419178 [details]. |