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

Unified Diff: Source/core/html/canvas/WebGLContextGroup.h

Issue 365653002: Oilpan: move 2D Canvas and WebGL objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Smaller adjustments Created 6 years, 5 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: Source/core/html/canvas/WebGLContextGroup.h
diff --git a/Source/core/html/canvas/WebGLContextGroup.h b/Source/core/html/canvas/WebGLContextGroup.h
index 077b5d2effe8bfac170b61794b6e3bd27a989037..81fa41d476582f49c6b32fb23e45821ab03a6ef8 100644
--- a/Source/core/html/canvas/WebGLContextGroup.h
+++ b/Source/core/html/canvas/WebGLContextGroup.h
@@ -58,13 +58,19 @@ public:
void loseContextGroup(WebGLRenderingContextBase::LostContextMode);
- private:
+private:
friend class WebGLObject;
WebGLContextGroup();
void detachAndRemoveAllObjects();
+ // FIXME: Oilpan: this object is not on the heap, but keeps bare
+ // pointers to garbage collected objects in the two hash sets
+ // below. The objects are responsible for managing their
+ // registration with WebGLContextGroup, and vice versa, the
+ // WebGLContextGroup takes care of detaching the group objects if
+ // the set of WebGLRenderingContextBase contexts becomes empty.
HashSet<WebGLRenderingContextBase*> m_contexts;
HashSet<WebGLSharedObject*> m_groupObjects;
};

Powered by Google App Engine
This is Rietveld 408576698