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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h

Issue 1363243003: Manage WebGLRenderingContextBase's weak refs manually without Oilpan. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reinstate WebGLContextObject dtor (non-Oilpan) Created 5 years, 3 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/modules/webgl/WebGLRenderingContextBase.h
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
index c9490a38ae517be3d2f8e82355c2cbdf7180bc9c..9d861b8269d8da494f67ae05d9b9f58e610da725 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
@@ -512,7 +512,16 @@ protected:
Timer<WebGLRenderingContextBase> m_restoreTimer;
bool m_markedCanvasDirty;
- PersistentHeapHashSetWillBeHeapHashSet<WeakMember<WebGLContextObject>> m_contextObjects;
+#if ENABLE(OILPAN)
+ HeapHashSet<WeakMember<WebGLContextObject>> m_contextObjects;
+#else
+ // The hash set isn't traced, hence the references are effectively
+ // weakly kept. Each WebGLContextObject is responsible for detaching
+ // itself upon finalization if the WebGLRenderingContextBase hasn't been
+ // finalized already and detached them via detachAndRemoveAllObjects().
+ GC_PLUGIN_IGNORE("534524")
+ HashSet<WebGLContextObject*> m_contextObjects;
+#endif
PersistentWillBeMember<WebGLRenderingContextLostCallback> m_contextLostCallbackAdapter;
PersistentWillBeMember<WebGLRenderingContextErrorMessageCallback> m_errorMessageCallbackAdapter;

Powered by Google App Engine
This is Rietveld 408576698