Title: [274786] trunk/Source/WebKit
Revision
274786
Author
[email protected]
Date
2021-03-22 13:15:04 -0700 (Mon, 22 Mar 2021)

Log Message

Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:2681:9: runtime error: load of value nnn, which is not a valid value for type 'BOOL' (aka 'signed char')
https://bugs.webkit.org/show_bug.cgi?id=223581

Reviewed by Simon Fraser.

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).

* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::pluginFocusOrWindowFocusChanged):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (274785 => 274786)


--- trunk/Source/WebKit/ChangeLog	2021-03-22 20:12:16 UTC (rev 274785)
+++ trunk/Source/WebKit/ChangeLog	2021-03-22 20:15:04 UTC (rev 274786)
@@ -1,3 +1,17 @@
+2021-03-22  Chris Dumez  <[email protected]>
+
+        Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:2681:9: runtime error: load of value nnn, which is not a valid value for type 'BOOL' (aka 'signed char')
+        https://bugs.webkit.org/show_bug.cgi?id=223581
+
+        Reviewed by Simon Fraser.
+
+        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).
+
+        * UIProcess/Cocoa/WebViewImpl.mm:
+        (WebKit::WebViewImpl::pluginFocusOrWindowFocusChanged):
+
 2021-03-22  Youenn Fablet  <[email protected]>
 
         Add an early return in UserMediaPermissionRequestManagerProxy::computeFilteredDeviceList

Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (274785 => 274786)


--- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm	2021-03-22 20:12:16 UTC (rev 274785)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm	2021-03-22 20:15:04 UTC (rev 274786)
@@ -2661,7 +2661,7 @@
 void WebViewImpl::pluginFocusOrWindowFocusChanged(bool pluginHasFocusAndWindowHasFocus, uint64_t pluginComplexTextInputIdentifier)
 {
     ASSERT(hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer));
-    BOOL inputSourceChanged = m_pluginComplexTextInputIdentifier;
+    bool inputSourceChanged = !!m_pluginComplexTextInputIdentifier;
 
     if (pluginHasFocusAndWindowHasFocus) {
         // Check if we're already allowing text input for this plug-in.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to