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 82e7bc914c5c74c763d61459f6c0dcf0a59b9935..6700f008e52a11cd5b7390f903c2230e25d90366 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/WrapperTypeInfo.h |
+++ b/third_party/WebKit/Source/bindings/core/v8/WrapperTypeInfo.h |
@@ -52,8 +52,6 @@ static const int v8PrototypeTypeIndex = 0; |
static const int v8PrototypeInternalFieldcount = 1; |
typedef v8::Local<v8::FunctionTemplate> (*DomTemplateFunction)(v8::Isolate*); |
-typedef void (*RefObjectFunction)(ScriptWrappable*); |
-typedef void (*DerefObjectFunction)(ScriptWrappable*); |
typedef void (*TraceFunction)(Visitor*, ScriptWrappable*); |
typedef ActiveScriptWrappable* (*ToActiveScriptWrappableFunction)(v8::Local<v8::Object>); |
typedef void (*ResolveWrapperReachabilityFunction)(v8::Isolate*, ScriptWrappable*, const v8::Persistent<v8::Object>&); |
@@ -90,13 +88,6 @@ struct WrapperTypeInfo { |
Independent, |
}; |
- enum GCType { |
- GarbageCollectedObject, |
- // TODO(haraken): Remove RefCountedObject. All DOM objects that inherit |
- // from ScriptWrappable must be moved to Oilpan's heap. |
- RefCountedObject, |
- }; |
- |
static const WrapperTypeInfo* unwrap(v8::Local<v8::Value> typeInfoWrapper) |
{ |
return reinterpret_cast<const WrapperTypeInfo*>(v8::External::Cast(*typeInfoWrapper)->Value()); |
@@ -129,36 +120,13 @@ struct WrapperTypeInfo { |
return domTemplateFunction(isolate); |
} |
- bool isGarbageCollected() const |
- { |
- return gcType == GarbageCollectedObject; |
- } |
- |
- void refObject(ScriptWrappable* scriptWrappable) const |
+ void wrapperCreated() const |
{ |
- if (isGarbageCollected()) { |
- Heap::heapStats().increaseWrapperCount(1); |
- } else { |
- ASSERT(refObjectFunction); |
- refObjectFunction(scriptWrappable); |
- } |
- } |
- |
- void derefObject(ScriptWrappable* scriptWrappable) const |
- { |
- if (isGarbageCollected()) { |
- ThreadHeapStats& heapStats = Heap::heapStats(); |
- heapStats.decreaseWrapperCount(1); |
- heapStats.increaseCollectedWrapperCount(1); |
- } else { |
- ASSERT(derefObjectFunction); |
- derefObjectFunction(scriptWrappable); |
- } |
+ Heap::heapStats().increaseWrapperCount(1); |
} |
- void derefObject() const |
+ void wrapperDestroyed() const |
{ |
- ASSERT(isGarbageCollected()); |
ThreadHeapStats& heapStats = Heap::heapStats(); |
heapStats.decreaseWrapperCount(1); |
heapStats.increaseCollectedWrapperCount(1); |
@@ -208,8 +176,6 @@ struct WrapperTypeInfo { |
const gin::GinEmbedder ginEmbedder; |
DomTemplateFunction domTemplateFunction; |
- const RefObjectFunction refObjectFunction; |
- const DerefObjectFunction derefObjectFunction; |
const TraceFunction traceFunction; |
const ToActiveScriptWrappableFunction toActiveScriptWrappableFunction; |
const ResolveWrapperReachabilityFunction visitDOMWrapperFunction; |
@@ -221,7 +187,6 @@ struct WrapperTypeInfo { |
const unsigned wrapperClassId : 2; // WrapperClassId |
const unsigned eventTargetInheritance : 1; // EventTargetInheritance |
const unsigned lifetime : 1; // Lifetime |
- const unsigned gcType : 2; // GCType |
}; |
template<typename T, int offset> |