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

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

Issue 1676973002: Introduce HeapAllocHooks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: WTF_EXPORT -> PLATFORM_EXPORT Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/heap/HeapPage.cpp
diff --git a/third_party/WebKit/Source/platform/heap/HeapPage.cpp b/third_party/WebKit/Source/platform/heap/HeapPage.cpp
index 637100d5f8eb42d30327a9ce160010aaeeb1702a..5c0b96271774e11c1442d3776e0313938252e487 100644
--- a/third_party/WebKit/Source/platform/heap/HeapPage.cpp
+++ b/third_party/WebKit/Source/platform/heap/HeapPage.cpp
@@ -1133,6 +1133,7 @@ void NormalPage::sweep()
// This is a fast version of header->payloadSize().
size_t payloadSize = size - sizeof(HeapObjectHeader);
Address payload = header->payload();
+ HeapAllocHooks::freeHookIfEnabled(payload);
haraken 2016/02/12 10:29:19 Can we move this into header->finalize()?
hajimehoshi 2016/02/15 07:14:46 Done.
// For ASan, unpoison the object before calling the finalizer. The
// finalized object will be zero-filled and poison'ed afterwards.
// Given all other unmarked objects are poisoned, ASan will detect
@@ -1448,6 +1449,7 @@ void LargeObjectPage::removeFromHeap()
void LargeObjectPage::sweep()
{
+ HeapAllocHooks::freeHookIfEnabled(payload());
haraken 2016/02/12 10:29:19 Then you can remove this.
hajimehoshi 2016/02/15 07:14:46 Done.
heapObjectHeader()->unmark();
Heap::increaseMarkedObjectSize(size());
}

Powered by Google App Engine
This is Rietveld 408576698