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

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

Issue 278433007: Oilpan: Update a comment for the WTF_ANNOTATE_LEAKING_OBJECT_PTR macro in PageMemory (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 RELEASE_ASSERT(res); 270 RELEASE_ASSERT(res);
271 return storage; 271 return storage;
272 #endif 272 #endif
273 } 273 }
274 274
275 private: 275 private:
276 PageMemory(const MemoryRegion& reserved, const MemoryRegion& writable) 276 PageMemory(const MemoryRegion& reserved, const MemoryRegion& writable)
277 : m_reserved(reserved) 277 : m_reserved(reserved)
278 , m_writable(writable) 278 , m_writable(writable)
279 { 279 {
280 // Leak Sanitizer runs before the shutdown sequence runs, and thus PageM emory objects 280 // This annotation is for letting the LeakSanitizer ignore PageMemory ob jects.
281 // are reported as leaking. So we annotate to let the Leak Sanitizer ign ore PageMemory objects. 281 //
282 // - The LeakSanitizer runs before the shutdown sequence and reports unr eachable memory blocks.
283 // - The LeakSanitizer only recognizes memory blocks allocated through m alloc/new,
284 // and we need special handling for mapped regions.
285 // - The PageMemory object is only referenced by a HeapPage<Header> obje ct, which is
286 // located inside the mapped region, which is not released until the s hutdown sequence.
287 //
288 // Given the above, we need to explicitly annotate that the LeakSanitize r should ignore
289 // PageMemory objects.
282 WTF_ANNOTATE_LEAKING_OBJECT_PTR(this); 290 WTF_ANNOTATE_LEAKING_OBJECT_PTR(this);
283 291
284 ASSERT(reserved.contains(writable)); 292 ASSERT(reserved.contains(writable));
285 } 293 }
286 294
287 MemoryRegion m_reserved; 295 MemoryRegion m_reserved;
288 MemoryRegion m_writable; 296 MemoryRegion m_writable;
289 }; 297 };
290 298
291 class GCScope { 299 class GCScope {
(...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1676 template class HeapPage<FinalizedHeapObjectHeader>; 1684 template class HeapPage<FinalizedHeapObjectHeader>;
1677 template class HeapPage<HeapObjectHeader>; 1685 template class HeapPage<HeapObjectHeader>;
1678 template class ThreadHeap<FinalizedHeapObjectHeader>; 1686 template class ThreadHeap<FinalizedHeapObjectHeader>;
1679 template class ThreadHeap<HeapObjectHeader>; 1687 template class ThreadHeap<HeapObjectHeader>;
1680 1688
1681 Visitor* Heap::s_markingVisitor; 1689 Visitor* Heap::s_markingVisitor;
1682 CallbackStack* Heap::s_markingStack; 1690 CallbackStack* Heap::s_markingStack;
1683 CallbackStack* Heap::s_weakCallbackStack; 1691 CallbackStack* Heap::s_weakCallbackStack;
1684 bool Heap::s_shutdownCalled = false; 1692 bool Heap::s_shutdownCalled = false;
1685 } 1693 }
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