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

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

Issue 1873323002: Have bindings layer assume and insist that all interface types are GCed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 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/DOMDataStore.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/DOMDataStore.h b/third_party/WebKit/Source/bindings/core/v8/DOMDataStore.h
index b3c1f7949df0bdec45cd4844aa0f934696e44c69..62484cd14861a310549c7111a919b2e2a084a0b8 100644
--- a/third_party/WebKit/Source/bindings/core/v8/DOMDataStore.h
+++ b/third_party/WebKit/Source/bindings/core/v8/DOMDataStore.h
@@ -215,23 +215,16 @@ private:
};
template<>
-inline void DOMWrapperMap<ScriptWrappable>::PersistentValueMapTraits::Dispose(v8::Isolate*, v8::Global<v8::Object> value, ScriptWrappable* key)
+inline void DOMWrapperMap<ScriptWrappable>::PersistentValueMapTraits::Dispose(v8::Isolate*, v8::Global<v8::Object> value, ScriptWrappable*)
{
- auto wrapperTypeInfo = toWrapperTypeInfo(value);
- if (wrapperTypeInfo->isGarbageCollected())
- wrapperTypeInfo->derefObject();
- else
- wrapperTypeInfo->derefObject(toScriptWrappable(value));
+ toWrapperTypeInfo(value)->wrapperDestroyed();
}
template<>
inline void DOMWrapperMap<ScriptWrappable>::PersistentValueMapTraits::DisposeWeak(const v8::WeakCallbackInfo<WeakCallbackDataType>& data)
{
auto wrapperTypeInfo = reinterpret_cast<WrapperTypeInfo*>(data.GetInternalField(v8DOMWrapperTypeIndex));
- if (wrapperTypeInfo->isGarbageCollected())
- wrapperTypeInfo->derefObject();
- else
- wrapperTypeInfo->derefObject(KeyFromWeakCallbackInfo(data));
+ wrapperTypeInfo->wrapperDestroyed();
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698