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

Unified Diff: Source/bindings/core/v8/WrapperTypeInfo.h

Issue 1211573006: Oilpan: Count # of collected Persistent handles and use it to estimate the live object size (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | Source/platform/heap/BlinkGCMemoryDumpProvider.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/WrapperTypeInfo.h
diff --git a/Source/bindings/core/v8/WrapperTypeInfo.h b/Source/bindings/core/v8/WrapperTypeInfo.h
index d2d8c76548a1da9ce6d67efcaef09267c5a54117..ee3b098ce79bf9d33be3b1c733619a78cfead8e2 100644
--- a/Source/bindings/core/v8/WrapperTypeInfo.h
+++ b/Source/bindings/core/v8/WrapperTypeInfo.h
@@ -126,12 +126,26 @@ struct WrapperTypeInfo {
void refObject(ScriptWrappable* scriptWrappable) const
{
+ if (gcType == GarbageCollectedObject) {
+ ThreadState::current()->persistentAllocated();
+ } else if (gcType == WillBeGarbageCollectedObject) {
+#if ENABLE(OILPAN)
+ ThreadState::current()->persistentAllocated();
+#endif
+ }
ASSERT(refObjectFunction);
refObjectFunction(scriptWrappable);
}
void derefObject(ScriptWrappable* scriptWrappable) const
{
+ if (gcType == GarbageCollectedObject) {
+ ThreadState::current()->persistentFreed();
+ } else if (gcType == WillBeGarbageCollectedObject) {
+#if ENABLE(OILPAN)
+ ThreadState::current()->persistentFreed();
+#endif
+ }
ASSERT(derefObjectFunction);
derefObjectFunction(scriptWrappable);
}
« no previous file with comments | « no previous file | Source/platform/heap/BlinkGCMemoryDumpProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698