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

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

Issue 2273683003: Use visitDOMWrapper to preserve WebGL JS object wrappers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: style Created 4 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/WebGLObject.h
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLObject.h b/third_party/WebKit/Source/modules/webgl/WebGLObject.h
index 6fe0442298e365e767876869325286932dc2abce..88c9dd954ac70324864e1c958022f98675244e57 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLObject.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLObject.h
@@ -26,6 +26,7 @@
#ifndef WebGLObject_h
#define WebGLObject_h
+#include "bindings/core/v8/DOMWrapperWorld.h"
#include "bindings/core/v8/ScriptWrappable.h"
#include "platform/heap/Handle.h"
#include "third_party/khronos/GLES2/gl2.h"
@@ -80,6 +81,10 @@ public:
DEFINE_INLINE_VIRTUAL_TRACE() { }
protected:
+ // To allow WebGL[2]RenderingContextBase to call visitChildDOMWrappers.
+ friend class WebGLRenderingContextBase;
+ friend class WebGL2RenderingContextBase;
+
explicit WebGLObject(WebGLRenderingContextBase*);
// deleteObjectImpl should be only called once to delete the OpenGL resource.
@@ -93,6 +98,8 @@ protected:
virtual gpu::gles2::GLES2Interface* getAGLInterface() const = 0;
+ virtual void visitChildDOMWrappers(v8::Isolate*, const v8::Persistent<v8::Object>&) { }
+
private:
unsigned m_attachmentCount;
bool m_deleted;
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGLFramebuffer.idl ('k') | third_party/WebKit/Source/modules/webgl/WebGLProgram.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698