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

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

Issue 1477023003: Refactor the Heap into ThreadHeap to prepare for per thread heaps Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactored Created 4 years, 11 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/bindings/core/v8/WrapperTypeInfo.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/WrapperTypeInfo.h b/third_party/WebKit/Source/bindings/core/v8/WrapperTypeInfo.h
index 6efa056876d9b0235b982162e3705de002c249ee..0206301dcff7f30c26c34f0ce5fd60b768d7e770 100644
--- a/third_party/WebKit/Source/bindings/core/v8/WrapperTypeInfo.h
+++ b/third_party/WebKit/Source/bindings/core/v8/WrapperTypeInfo.h
@@ -140,7 +140,7 @@ struct WrapperTypeInfo {
void refObject(ScriptWrappable* scriptWrappable) const
{
if (isGarbageCollected()) {
- Heap::increaseWrapperCount(1);
+ ThreadState::current()->gcGroup()->heapStats().increaseWrapperCount(1);
} else {
ASSERT(refObjectFunction);
refObjectFunction(scriptWrappable);
@@ -150,8 +150,9 @@ struct WrapperTypeInfo {
void derefObject(ScriptWrappable* scriptWrappable) const
{
if (isGarbageCollected()) {
- Heap::decreaseWrapperCount(1);
- Heap::increaseCollectedWrapperCount(1);
+ GCHeapStats& heapStats = ThreadState::current()->gcGroup()->heapStats();
+ heapStats.decreaseWrapperCount(1);
+ heapStats.increaseCollectedWrapperCount(1);
} else {
ASSERT(derefObjectFunction);
derefObjectFunction(scriptWrappable);
@@ -161,8 +162,9 @@ struct WrapperTypeInfo {
void derefObject() const
{
ASSERT(isGarbageCollected());
- Heap::decreaseWrapperCount(1);
- Heap::increaseCollectedWrapperCount(1);
+ GCHeapStats& heapStats = ThreadState::current()->gcGroup()->heapStats();
+ heapStats.decreaseWrapperCount(1);
+ heapStats.increaseCollectedWrapperCount(1);
}
void trace(Visitor* visitor, ScriptWrappable* scriptWrappable) const

Powered by Google App Engine
This is Rietveld 408576698