Title: [245254] trunk/Source/WTF
Revision
245254
Author
ysuz...@apple.com
Date
2019-05-13 15:00:09 -0700 (Mon, 13 May 2019)

Log Message

Unreviewed, follow-up after r245214
https://bugs.webkit.org/show_bug.cgi?id=197730

Suggested by Sam. We should have static_assert with MACH_VM_MAX_ADDRESS.

* wtf/WTFAssertions.cpp:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (245253 => 245254)


--- trunk/Source/WTF/ChangeLog	2019-05-13 21:52:35 UTC (rev 245253)
+++ trunk/Source/WTF/ChangeLog	2019-05-13 22:00:09 UTC (rev 245254)
@@ -1,3 +1,12 @@
+2019-05-13  Yusuke Suzuki  <ysuz...@apple.com>
+
+        Unreviewed, follow-up after r245214
+        https://bugs.webkit.org/show_bug.cgi?id=197730
+
+        Suggested by Sam. We should have static_assert with MACH_VM_MAX_ADDRESS.
+
+        * wtf/WTFAssertions.cpp:
+
 2019-05-13  Youenn Fablet  <you...@apple.com>
 
         Use kDNSServiceFlagsKnownUnique for DNSServiceRegisterRecord only on platforms supporting it

Modified: trunk/Source/WTF/wtf/WTFAssertions.cpp (245253 => 245254)


--- trunk/Source/WTF/wtf/WTFAssertions.cpp	2019-05-13 21:52:35 UTC (rev 245253)
+++ trunk/Source/WTF/wtf/WTFAssertions.cpp	2019-05-13 22:00:09 UTC (rev 245254)
@@ -26,9 +26,14 @@
 #include "config.h"
 
 #include <wtf/Bag.h>
+#include <wtf/Platform.h>
 #include <wtf/RefCountedArray.h>
 #include <wtf/RefPtr.h>
 
+#if OS(DARWIN)
+#include <mach/vm_param.h>
+#endif
+
 namespace WTF {
 
 namespace {
@@ -42,6 +47,10 @@
 static_assert(sizeof(RefPtr<DummyStruct>) == sizeof(DummyStruct*), "");
 
 static_assert(sizeof(RefCountedArray<DummyStruct>) == sizeof(void*), "");
+
+#if OS(DARWIN)
+static_assert(MACH_VM_MAX_ADDRESS <= ((1ULL << WTF_CPU_EFFECTIVE_ADDRESS_WIDTH) - 1));
+#endif
     
 } // namespace WTF
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to