Build fix (r233547): Disable IsoHeaps when Gigacage is off
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Jul 2018 00:19:57 +0000 (00:19 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Jul 2018 00:19:57 +0000 (00:19 +0000)
<https://webkit.org/b/187160>

* bmalloc/PerThread.cpp: Add #if !HAVE_PTHREAD_MACHDEP_H/#endif
around variables only used when that macro is 0.  Include what
you use: Cache.h and Heap.h.
* bmalloc/PerThread.h: Include <memory> for std::once_flag.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233550 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/bmalloc/ChangeLog
Source/bmalloc/bmalloc/PerThread.cpp
Source/bmalloc/bmalloc/PerThread.h

index 75126e4..16505ae 100644 (file)
@@ -1,3 +1,13 @@
+2018-07-05  David Kilzer  <ddkilzer@apple.com>
+
+        Build fix (r233547): Disable IsoHeaps when Gigacage is off
+        <https://webkit.org/b/187160>
+
+        * bmalloc/PerThread.cpp: Add #if !HAVE_PTHREAD_MACHDEP_H/#endif
+        around variables only used when that macro is 0.  Include what
+        you use: Cache.h and Heap.h.
+        * bmalloc/PerThread.h: Include <memory> for std::once_flag.
+
 2018-07-05  Michael Saboff  <msaboff@apple.com>
 
         Disable IsoHeaps when Gigacage is off
index 9514456..ff6a7b3 100644 (file)
 #include "PerThread.h"
 
 #include "BExport.h"
+#include "Cache.h"
+#include "Heap.h"
 
 namespace bmalloc {
-    
+
+#if !HAVE_PTHREAD_MACHDEP_H
+
 template<> BEXPORT bool PerThreadStorage<PerHeapKind<Cache>>::s_didInitialize = false;
 template<> BEXPORT pthread_key_t PerThreadStorage<PerHeapKind<Cache>>::s_key = 0;
 template<> BEXPORT std::once_flag PerThreadStorage<PerHeapKind<Cache>>::s_onceFlag = { };
@@ -37,4 +41,6 @@ template<> BEXPORT bool PerThreadStorage<PerHeapKind<Heap>>::s_didInitialize = f
 template<> BEXPORT pthread_key_t PerThreadStorage<PerHeapKind<Heap>>::s_key = 0;
 template<> BEXPORT std::once_flag PerThreadStorage<PerHeapKind<Heap>>::s_onceFlag = { };
 
+#endif
+
 } // namespace bmalloc
index eda7420..4e48d8d 100644 (file)
@@ -30,6 +30,7 @@
 #include "BPlatform.h"
 #include "PerHeapKind.h"
 #include "VMAllocate.h"
+#include <memory>
 #include <mutex>
 #include <pthread.h>