| Index: test/cctest/test-api.cc
|
| diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
| index f1cda629356adf9e8836e7ef3450068b1f84e151..382ef61d574f26d6209deb58a63c8df446c15280 100644
|
| --- a/test/cctest/test-api.cc
|
| +++ b/test/cctest/test-api.cc
|
| @@ -3498,22 +3498,23 @@ THREADED_TEST(UniquePersistent) {
|
| template<typename K, typename V>
|
| class WeakStdMapTraits : public v8::StdMapTraits<K, V> {
|
| public:
|
| - typedef typename v8::DefaultPersistentValueMapTraits<K, V>::Impl Impl;
|
| + typedef typename v8::PersistentValueMap<K, V, WeakStdMapTraits<K, V> >
|
| + MapType;
|
| static const bool kIsWeak = true;
|
| struct WeakCallbackDataType {
|
| - Impl* impl;
|
| + MapType* map;
|
| K key;
|
| };
|
| static WeakCallbackDataType* WeakCallbackParameter(
|
| - Impl* impl, const K& key, Local<V> value) {
|
| + MapType* map, const K& key, Local<V> value) {
|
| WeakCallbackDataType* data = new WeakCallbackDataType;
|
| - data->impl = impl;
|
| + data->map = map;
|
| data->key = key;
|
| return data;
|
| }
|
| - static Impl* ImplFromWeakCallbackData(
|
| + static MapType* MapFromWeakCallbackData(
|
| const v8::WeakCallbackData<V, WeakCallbackDataType>& data) {
|
| - return data.GetParameter()->impl;
|
| + return data.GetParameter()->map;
|
| }
|
| static K KeyFromWeakCallbackData(
|
| const v8::WeakCallbackData<V, WeakCallbackDataType>& data) {
|
| @@ -3523,7 +3524,7 @@ class WeakStdMapTraits : public v8::StdMapTraits<K, V> {
|
| delete data;
|
| }
|
| static void Dispose(v8::Isolate* isolate, v8::UniquePersistent<V> value,
|
| - Impl* impl, K key) { }
|
| + K key) { }
|
| };
|
|
|
|
|
| @@ -3572,7 +3573,7 @@ TEST(PersistentValueMap) {
|
| TestPersistentValueMap<v8::StdPersistentValueMap<int, v8::Object> >();
|
|
|
| // Custom traits with weak callbacks:
|
| - typedef v8::StdPersistentValueMap<int, v8::Object,
|
| + typedef v8::PersistentValueMap<int, v8::Object,
|
| WeakStdMapTraits<int, v8::Object> > WeakPersistentValueMap;
|
| TestPersistentValueMap<WeakPersistentValueMap>();
|
| }
|
|
|