Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Unified Diff: third_party/WebKit/Source/platform/heap/HeapTest.cpp

Issue 2464273002: Fix ThreadHeap::isHeapObjectAlive(const T*& ptr) stack overflow. (Closed)
Patch Set: Fix test. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/heap/Heap.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/heap/HeapTest.cpp
diff --git a/third_party/WebKit/Source/platform/heap/HeapTest.cpp b/third_party/WebKit/Source/platform/heap/HeapTest.cpp
index c3d0aa58ecde03ca0c071339ef8076e59a984131..6a33c1cc563146fc36021d4193b32aa16d6e8f49 100644
--- a/third_party/WebKit/Source/platform/heap/HeapTest.cpp
+++ b/third_party/WebKit/Source/platform/heap/HeapTest.cpp
@@ -742,6 +742,11 @@ class ClassWithMember : public GarbageCollected<ClassWithMember> {
DEFINE_INLINE_TRACE() {
EXPECT_TRUE(ThreadHeap::isHeapObjectAlive(this));
+
+ // Const pointer should also be alive. See http://crbug.com/661363.
+ const ClassWithMember* constPtr = static_cast<const ClassWithMember*>(this);
+ EXPECT_TRUE(ThreadHeap::isHeapObjectAlive(constPtr));
+
if (!traceCount())
EXPECT_FALSE(ThreadHeap::isHeapObjectAlive(m_traceCounter));
else
« no previous file with comments | « third_party/WebKit/Source/platform/heap/Heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698