Fix bug found by UBSAN in WebViewImpl::pluginFocusOrWindowFocusChanged().
Created attachment 423897 [details] Patch
Created attachment 423902 [details] Patch
Committed r274786: <https://commits.webkit.org/r274786> All reviewed patches have been landed. Closing bug and clearing flags on attachment 423902 [details].
<rdar://problem/75705715>
Comment on attachment 423902 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=423902&action=review > Source/WebKit/ChangeLog:10 > + The code was implicitly casting an uint64_t identifier into a BOOL variable. The intention was > + to check whether the identifier is 0 or not. To silence the UBSAN error, we now use the bool > + type instead of BOOL (since BOOL is defined as a signed char on some platforms). On platforms where BOOL is signed char, the original code will work wrong any time the low 8 bits of the pointer are zero! I feel like we are concentrating too much on "placating" UBSan and too little on fixing the bug UBSan found in our commentary.