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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLContextGroup.cpp

Issue 2547393002: Correct comment related to WebGLContextGroup's weak references. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webgl/WebGLContextGroup.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLContextGroup.cpp b/third_party/WebKit/Source/modules/webgl/WebGLContextGroup.cpp
index 0f7d79f5a4c0f6b25924bc361c1219bb6ae7844e..d8437939d8b11a132a3f1263a0298ad37d13524b 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLContextGroup.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLContextGroup.cpp
@@ -30,10 +30,12 @@ namespace blink {
WebGLContextGroup::WebGLContextGroup() : m_numberOfContextLosses(0) {}
gpu::gles2::GLES2Interface* WebGLContextGroup::getAGLInterface() {
- // During an Oilpan GC where WebGL objects become unreachable at the same
- // time the context does, the m_contexts set can be fully cleared out
- // before WebGLObjects' destructors run. Since the calling code handles
- // this gracefully, explicitly test for this possibility.
+ // It's possible that all of the WebGLRenderingContextBases (currently
+ // only one) referenced weakly by this WebGLContextGroup are GC'd before
+ // the (shared) WebGLObjects that it created. Since the calling code
+ // handles this gracefully, and since the graphical resources will have
+ // been implicitly reclaimed by the deletion of the context, explicitly
+ // test for this possibility.
if (m_contexts.isEmpty())
return nullptr;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698