Index: third_party/WebKit/Source/platform/heap/PageMemory.h |
diff --git a/third_party/WebKit/Source/platform/heap/PageMemory.h b/third_party/WebKit/Source/platform/heap/PageMemory.h |
index 6e1e87a24d91de89b067376e31b5d8f808f8808b..af36c612cf9a76e5cfe66c075592599a33cc55f8 100644 |
--- a/third_party/WebKit/Source/platform/heap/PageMemory.h |
+++ b/third_party/WebKit/Source/platform/heap/PageMemory.h |
@@ -174,6 +174,17 @@ class PageMemory { |
WARN_UNUSED_RESULT bool commit() { |
m_reserved->markPageUsed(writableStart()); |
+#if DCHECK_IS_ON() |
+ // Check that in-use page isn't also marked as being a non-heap page |
+ // by the current heap's negative cache. That cache is invalidated |
+ // when allocating new pages, but crbug.com/649485 suggests that |
+ // we do get out of sync somehow. |
+ // |
+ // TODO(sof): consider removing check once bug has been diagnosed |
+ // and addressed. |
+ DCHECK(!ThreadState::current()->isAddressInHeapDoesNotContainCache( |
haraken
2017/02/24 13:21:22
I'm fine with using a CHECK given that commit() wo
sof
2017/02/24 13:54:37
good idea, let's do that and try to flush out the
|
+ writableStart())); |
+#endif |
return m_writable.commit(); |
} |