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

Unified Diff: Source/core/html/canvas/WebGLContextObject.cpp

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: Round of improvements Created 6 years, 6 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/WebGLContextObject.cpp
diff --git a/Source/core/html/canvas/WebGLContextObject.cpp b/Source/core/html/canvas/WebGLContextObject.cpp
index 83441589defb70bea4690902c64c94840d3ce119..ee8a7401cb44732b770c33cd6a00a997b9f360da 100644
--- a/Source/core/html/canvas/WebGLContextObject.cpp
+++ b/Source/core/html/canvas/WebGLContextObject.cpp
@@ -39,8 +39,10 @@ WebGLContextObject::WebGLContextObject(WebGLRenderingContextBase* context)
WebGLContextObject::~WebGLContextObject()
{
+#if !ENABLE(OILPAN)
if (m_context)
m_context->removeContextObject(this);
haraken 2014/07/03 04:40:29 Not related to this CL, I wonder why this destruct
sof 2014/07/03 07:25:48 Looks like its derived classes does it instead.
+#endif
}
void WebGLContextObject::detachContext()
@@ -49,7 +51,7 @@ void WebGLContextObject::detachContext()
if (m_context) {
deleteObject(m_context->webContext());
m_context->removeContextObject(this);
- m_context = 0;
+ m_context = nullptr;
}
}
@@ -58,4 +60,10 @@ blink::WebGraphicsContext3D* WebGLContextObject::getAWebGraphicsContext3D() cons
return m_context ? m_context->webContext() : 0;
}
+void WebGLContextObject::trace(Visitor* visitor)
+{
+ visitor->trace(m_context);
+ WebGLObject::trace(visitor);
+}
+
}

Powered by Google App Engine
This is Rietveld 408576698