Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h |
| diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h |
| index 5cdf864c651079ab294c6786dbdaa4ad0dd3db8b..940396936557ee402cc08e081b3bfbe6090646e9 100644 |
| --- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h |
| +++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h |
| @@ -1039,7 +1039,28 @@ protected: |
| // latched into the context's state, or which are implicitly |
| // linked together (like programs and their attached shaders), are |
| // not garbage collected before they should be. |
| - static void preserveObjectWrapper(ScriptState*, ScriptWrappable* sourceObject, const char* baseName, unsigned long index, ScriptWrappable* targetObject); |
| + v8::Persistent<v8::Array> m_2DTextureWrappers; |
| + v8::Persistent<v8::Array> m_2DArrayTextureWrappers; |
| + v8::Persistent<v8::Array> m_3DTextureWrappers; |
| + v8::Persistent<v8::Array> m_cubeMapTextureWrappers; |
| + v8::Persistent<v8::Array> m_extensionWrappers; |
|
haraken
2016/05/13 01:32:41
Would you help me understand why these persistent
Ken Russell (switch to Gerrit)
2016/05/13 01:45:35
I specifically made them weak to avoid possible le
|
| + |
| + // The "catch-all" array for the rest of the preserved object |
| + // wrappers. The enum below defines how the indices in this array |
| + // are used. |
| + enum PreservedWrapperIndex { |
| + PreservedArrayBuffer, |
| + PreservedElementArrayBuffer, |
| + PreservedFramebuffer, |
| + PreservedProgram, |
| + PreservedRenderbuffer, |
| + PreservedDefaultVAO, |
| + PreservedVAO, |
| + }; |
| + v8::Persistent<v8::Array> m_miscWrappers; |
| + |
| + static void preserveObjectWrapper(ScriptState*, ScriptWrappable* sourceObject, v8::Local<v8::String> hiddenValueName, v8::Persistent<v8::Array>* persistentCache, uint32_t index, ScriptWrappable* targetObject); |
| + |
| // Called to lazily instantiate the wrapper for the default VAO |
| // during calls to bindBuffer and vertexAttribPointer (from |
| // JavaScript). |