Title: [254224] trunk/Source/_javascript_Core
Revision
254224
Author
msab...@apple.com
Date
2020-01-08 14:04:08 -0800 (Wed, 08 Jan 2020)

Log Message

TypeProfiler.h: Multiplication result converted to larger type
https://bugs.webkit.org/show_bug.cgi?id=205947

Reviewed by Mark Lam.

Added cast to keep the hash() calculation unsigned.

* runtime/TypeProfiler.h:
(JSC::QueryKey::hash const):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (254223 => 254224)


--- trunk/Source/_javascript_Core/ChangeLog	2020-01-08 22:00:36 UTC (rev 254223)
+++ trunk/Source/_javascript_Core/ChangeLog	2020-01-08 22:04:08 UTC (rev 254224)
@@ -1,5 +1,17 @@
 2020-01-08  Michael Saboff  <msab...@apple.com>
 
+        TypeProfiler.h: Multiplication result converted to larger type
+        https://bugs.webkit.org/show_bug.cgi?id=205947
+
+        Reviewed by Mark Lam.
+
+        Added cast to keep the hash() calculation unsigned.
+
+        * runtime/TypeProfiler.h:
+        (JSC::QueryKey::hash const):
+
+2020-01-08  Michael Saboff  <msab...@apple.com>
+
         JSArrayBufferView.h: Multiplication result converted to larger type
         https://bugs.webkit.org/show_bug.cgi?id=205943
 

Modified: trunk/Source/_javascript_Core/runtime/TypeProfiler.h (254223 => 254224)


--- trunk/Source/_javascript_Core/runtime/TypeProfiler.h	2020-01-08 22:00:36 UTC (rev 254223)
+++ trunk/Source/_javascript_Core/runtime/TypeProfiler.h	2020-01-08 22:04:08 UTC (rev 254224)
@@ -78,7 +78,7 @@
 
     unsigned hash() const 
     { 
-        unsigned hash = m_sourceID + m_divot * m_searchDescriptor;
+        unsigned hash = static_cast<unsigned>(m_sourceID) + m_divot * m_searchDescriptor;
         return hash;
     }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to