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

Side by Side Diff: Source/platform/heap/GCInfo.cpp

Issue 1159703002: Oilpan: assertObjectHasGCInfo should not allow access to orphaned pages (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "platform/heap/GCInfo.h" 6 #include "platform/heap/GCInfo.h"
7 7
8 #include "platform/heap/Handle.h" 8 #include "platform/heap/Handle.h"
9 #include "platform/heap/Heap.h" 9 #include "platform/heap/Heap.h"
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 69 }
70 70
71 #if ENABLE(ASSERT) 71 #if ENABLE(ASSERT)
72 void assertObjectHasGCInfo(const void* payload, size_t gcInfoIndex) 72 void assertObjectHasGCInfo(const void* payload, size_t gcInfoIndex)
73 { 73 {
74 HeapObjectHeader::fromPayload(payload)->checkHeader(); 74 HeapObjectHeader::fromPayload(payload)->checkHeader();
75 #if !defined(COMPONENT_BUILD) 75 #if !defined(COMPONENT_BUILD)
76 // On component builds we cannot compare the gcInfos as they are statically 76 // On component builds we cannot compare the gcInfos as they are statically
77 // defined in each of the components and hence will not match. 77 // defined in each of the components and hence will not match.
78 BasePage* page = pageFromObject(payload); 78 BasePage* page = pageFromObject(payload);
79 ASSERT(page->orphaned() || HeapObjectHeader::fromPayload(payload)->gcInfoInd ex() == gcInfoIndex); 79 ASSERT(!page->orphaned());
80 ASSERT(HeapObjectHeader::fromPayload(payload)->gcInfoIndex() == gcInfoIndex) ;
80 #endif 81 #endif
81 } 82 }
82 #endif 83 #endif
83 84
84 } // namespace blink 85 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698