| Index: third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.h
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.h b/third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.h
|
| index 7f2fdd8d6e867479d114633a38bbf5204c2c9312..5cb815b89adabe528932c049ebe1f3ecb6dbb5f6 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.h
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.h
|
| @@ -59,7 +59,6 @@ public:
|
| static v8::Local<v8::Object> associateObjectWithWrapper(v8::Isolate*, ScriptWrappable*, const WrapperTypeInfo*, v8::Local<v8::Object> wrapper) WARN_UNUSED_RETURN;
|
| static v8::Local<v8::Object> associateObjectWithWrapper(v8::Isolate*, Node*, const WrapperTypeInfo*, v8::Local<v8::Object> wrapper) WARN_UNUSED_RETURN;
|
| static void setNativeInfo(v8::Local<v8::Object>, const WrapperTypeInfo*, ScriptWrappable*);
|
| - static void clearNativeInfo(v8::Local<v8::Object>, const WrapperTypeInfo*);
|
| // hasInternalFieldsSet only checks if the value has the internal fields for
|
| // wrapper obejct and type, and does not check if it's valid or not. The
|
| // value may not be a Blink's wrapper object. In order to make sure of it,
|
| @@ -76,20 +75,10 @@ inline void V8DOMWrapper::setNativeInfo(v8::Local<v8::Object> wrapper, const Wra
|
| wrapper->SetAlignedPointerInInternalField(v8DOMWrapperTypeIndex, const_cast<WrapperTypeInfo*>(wrapperTypeInfo));
|
| }
|
|
|
| -inline void V8DOMWrapper::clearNativeInfo(v8::Local<v8::Object> wrapper, const WrapperTypeInfo* wrapperTypeInfo)
|
| -{
|
| - ASSERT(wrapper->InternalFieldCount() >= 2);
|
| - ASSERT(wrapperTypeInfo);
|
| - // clearNativeInfo() is used only by NP objects, which are not garbage collected.
|
| - ASSERT(wrapperTypeInfo->gcType == WrapperTypeInfo::RefCountedObject);
|
| - wrapper->SetAlignedPointerInInternalField(v8DOMWrapperTypeIndex, const_cast<WrapperTypeInfo*>(wrapperTypeInfo));
|
| - wrapper->SetAlignedPointerInInternalField(v8DOMWrapperObjectIndex, 0);
|
| -}
|
| -
|
| inline v8::Local<v8::Object> V8DOMWrapper::associateObjectWithWrapper(v8::Isolate* isolate, ScriptWrappable* impl, const WrapperTypeInfo* wrapperTypeInfo, v8::Local<v8::Object> wrapper)
|
| {
|
| if (DOMDataStore::setWrapper(isolate, impl, wrapperTypeInfo, wrapper)) {
|
| - wrapperTypeInfo->refObject(impl);
|
| + wrapperTypeInfo->wrapperCreated();
|
| setNativeInfo(wrapper, wrapperTypeInfo, impl);
|
| ASSERT(hasInternalFieldsSet(wrapper));
|
| }
|
| @@ -100,7 +89,7 @@ inline v8::Local<v8::Object> V8DOMWrapper::associateObjectWithWrapper(v8::Isolat
|
| inline v8::Local<v8::Object> V8DOMWrapper::associateObjectWithWrapper(v8::Isolate* isolate, Node* node, const WrapperTypeInfo* wrapperTypeInfo, v8::Local<v8::Object> wrapper)
|
| {
|
| if (DOMDataStore::setWrapper(isolate, node, wrapperTypeInfo, wrapper)) {
|
| - wrapperTypeInfo->refObject(ScriptWrappable::fromNode(node));
|
| + wrapperTypeInfo->wrapperCreated();
|
| setNativeInfo(wrapper, wrapperTypeInfo, ScriptWrappable::fromNode(node));
|
| ASSERT(hasInternalFieldsSet(wrapper));
|
| }
|
|
|