Index: third_party/WebKit/Source/platform/heap/HeapAllocator.h |
diff --git a/third_party/WebKit/Source/platform/heap/HeapAllocator.h b/third_party/WebKit/Source/platform/heap/HeapAllocator.h |
index 2c1cf3547e56e0c45d3a4a3d72f893d7db83e322..c1c9f1419c149ac9f63539ffa976332120492627 100644 |
--- a/third_party/WebKit/Source/platform/heap/HeapAllocator.h |
+++ b/third_party/WebKit/Source/platform/heap/HeapAllocator.h |
@@ -106,7 +106,20 @@ public: |
{ |
return reinterpret_cast<Return>(ThreadHeap::allocate<Metadata>(size, IsEagerlyFinalizedType<Metadata>::value)); |
} |
- static void free(void* address) { } |
+ |
+#if OS(WIN) && COMPILER(MSVC) |
+ // MSVC eagerly instantiates the unused 'operator delete', |
+ // provide a version that asserts and fails at run-time if |
+ // used. |
+ // Elsewhere we expect compilation to fail if 'delete' is |
+ // attempted used and instantiated with a HeapAllocator-based |
+ // object, as HeapAllocator::free is not provided. |
+ static void free(void*) |
+ { |
+ NOTREACHED(); |
+ } |
+#endif |
+ |
template<typename T> |
static void* newArray(size_t bytes) |
{ |