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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.cpp

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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/webgl/WebGLVertexArrayObjectBase.h" 5 #include "modules/webgl/WebGLVertexArrayObjectBase.h"
6 6
7 #include "gpu/command_buffer/client/gles2_interface.h" 7 #include "gpu/command_buffer/client/gles2_interface.h"
8 #include "modules/webgl/WebGLRenderingContextBase.h" 8 #include "modules/webgl/WebGLRenderingContextBase.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 for (size_t i = 0; i < m_arrayBufferList.size(); ++i) { 134 for (size_t i = 0; i < m_arrayBufferList.size(); ++i) {
135 if (m_arrayBufferList[i] == buffer) { 135 if (m_arrayBufferList[i] == buffer) {
136 m_arrayBufferList[i]->onDetached(context()->contextGL()); 136 m_arrayBufferList[i]->onDetached(context()->contextGL());
137 m_arrayBufferList[i] = nullptr; 137 m_arrayBufferList[i] = nullptr;
138 } 138 }
139 } 139 }
140 updateAttribBufferBoundStatus(); 140 updateAttribBufferBoundStatus();
141 } 141 }
142 142
143 ScopedPersistent<v8::Array>* WebGLVertexArrayObjectBase::getPersistentCache() 143 void WebGLVertexArrayObjectBase::visitChildDOMWrappers(v8::Isolate* isolate, con st v8::Persistent<v8::Object>& wrapper)
144 { 144 {
145 return &m_arrayBufferWrappers; 145 DOMWrapperWorld::setWrapperReferencesInAllWorlds(wrapper, m_boundElementArra yBuffer, isolate);
146 for (size_t i = 0; i < m_arrayBufferList.size(); ++i) {
147 DOMWrapperWorld::setWrapperReferencesInAllWorlds(wrapper, m_arrayBufferL ist[i], isolate);
148 }
146 } 149 }
147 150
148 DEFINE_TRACE(WebGLVertexArrayObjectBase) 151 DEFINE_TRACE(WebGLVertexArrayObjectBase)
149 { 152 {
150 visitor->trace(m_boundElementArrayBuffer); 153 visitor->trace(m_boundElementArrayBuffer);
151 visitor->trace(m_arrayBufferList); 154 visitor->trace(m_arrayBufferList);
152 WebGLContextObject::trace(visitor); 155 WebGLContextObject::trace(visitor);
153 } 156 }
154 157
155 } // namespace blink 158 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698