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

Unified Diff: Source/bindings/v8/V8NPObject.cpp

Issue 180363004: Convert DOMWrapperMap to use PersistentValueMap (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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
« Source/bindings/v8/DOMWrapperMap.h ('K') | « Source/bindings/v8/V8NPObject.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8NPObject.cpp
diff --git a/Source/bindings/v8/V8NPObject.cpp b/Source/bindings/v8/V8NPObject.cpp
index a3f8ab7566c8219ff8ac88292599c05ee6b53164..4020f925f657b1e698788adc7b9a7a7ba0c6cd20 100644
--- a/Source/bindings/v8/V8NPObject.cpp
+++ b/Source/bindings/v8/V8NPObject.cpp
@@ -404,18 +404,8 @@ static DOMWrapperMap<NPObject>& staticNPObjectMap()
return npObjectMap;
}
-template<>
-inline void DOMWrapperMap<NPObject>::setWeakCallback(const v8::WeakCallbackData<v8::Object, DOMWrapperMap<NPObject> >& data)
+void DOMWrapperMapDisposeHelper(NPObject* npObject)
{
- NPObject* npObject = static_cast<NPObject*>(toNative(data.GetValue()));
-
- ASSERT(npObject);
- ASSERT(staticNPObjectMap().containsKeyAndValue(npObject, data.GetValue()));
-
- // Must remove from our map before calling _NPN_ReleaseObject(). _NPN_ReleaseObject can
- // call forgetV8ObjectForNPObject, which uses the table as well.
- staticNPObjectMap().removeAndDispose(npObject);
-
if (_NPN_IsAlive(npObject))
_NPN_ReleaseObject(npObject);
}
« Source/bindings/v8/DOMWrapperMap.h ('K') | « Source/bindings/v8/V8NPObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698