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..2407eed99491efd485ad97e10ab89ddc9a348d48 100644 |
--- a/third_party/WebKit/Source/platform/heap/PageMemory.h |
+++ b/third_party/WebKit/Source/platform/heap/PageMemory.h |
@@ -174,6 +174,15 @@ class PageMemory { |
WARN_UNUSED_RESULT bool commit() { |
m_reserved->markPageUsed(writableStart()); |
+ // 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. |
+ CHECK(!ThreadState::current()->isAddressInHeapDoesNotContainCache( |
+ writableStart())); |
return m_writable.commit(); |
} |