Title: [206523] trunk/Source/WTF
Revision
206523
Author
bfulg...@apple.com
Date
2016-09-28 09:34:06 -0700 (Wed, 28 Sep 2016)

Log Message

Correct 'safeCast' implementation
https://bugs.webkit.org/show_bug.cgi?id=162679
<rdar://problem/28518189>

Reviewed by Zalan Bujtas.

* wtf/StdLibExtras.h:
(WTF::safeCast): Use a RELEASE_ASSERT.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (206522 => 206523)


--- trunk/Source/WTF/ChangeLog	2016-09-28 16:33:16 UTC (rev 206522)
+++ trunk/Source/WTF/ChangeLog	2016-09-28 16:34:06 UTC (rev 206523)
@@ -1,3 +1,14 @@
+2016-09-28  Brent Fulgham  <bfulg...@apple.com>
+
+        Correct 'safeCast' implementation
+        https://bugs.webkit.org/show_bug.cgi?id=162679
+        <rdar://problem/28518189>
+
+        Reviewed by Zalan Bujtas.
+
+        * wtf/StdLibExtras.h:
+        (WTF::safeCast): Use a RELEASE_ASSERT.
+
 2016-09-27  Don Olmstead  <don.olmst...@am.sony.com>
 
         [CMake] Add HAVE_LOCALTIME_R definition

Modified: trunk/Source/WTF/wtf/StdLibExtras.h (206522 => 206523)


--- trunk/Source/WTF/wtf/StdLibExtras.h	2016-09-28 16:33:16 UTC (rev 206522)
+++ trunk/Source/WTF/wtf/StdLibExtras.h	2016-09-28 16:34:06 UTC (rev 206523)
@@ -159,7 +159,7 @@
 template<typename ToType, typename FromType>
 inline ToType safeCast(FromType value)
 {
-    ASSERT(isInBounds<ToType>(value));
+    RELEASE_ASSERT(isInBounds<ToType>(value));
     return static_cast<ToType>(value);
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to