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

Unified Diff: include/v8-util.h

Issue 998253006: two pass phantom collection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix test Created 5 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
Index: include/v8-util.h
diff --git a/include/v8-util.h b/include/v8-util.h
index 21990a8fd9c681c91c2599ab40434520a22b3a78..b01d527754b5ce758d641fadfabc0b7133d92c5f 100644
--- a/include/v8-util.h
+++ b/include/v8-util.h
@@ -322,7 +322,11 @@ class PersistentValueMapBase {
return p.Pass();
}
- void RemoveWeak(const K& key) { Traits::Remove(&impl_, key); }
+ void RemoveWeak(const K& key) {
+ Global<V> p;
+ p.val_ = FromVal(Traits::Remove(&impl_, key));
+ p.Reset();
Erik Corry 2015/03/26 10:07:10 Why do we have to create a Global, then immediatel
dcarney 2015/03/26 10:26:56 here nothing is being created. we're just releasi
+ }
private:
PersistentValueMapBase(PersistentValueMapBase&);
@@ -476,7 +480,6 @@ class GlobalValueMap : public PersistentValueMapBase<K, V, Traits> {
K key = Traits::KeyFromWeakCallbackInfo(data);
persistentValueMap->RemoveWeak(key);
Traits::DisposeWeak(data.GetIsolate(), data, key);
- Traits::DisposeCallbackData(data.GetParameter());
}
}
};

Powered by Google App Engine
This is Rietveld 408576698