summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2012-08-28 10:39:02 -0700
committerandroid code review <noreply-gerritcodereview@google.com>2012-08-28 10:39:02 -0700
commit5161915319ca55318d2ef68a84b735f01c3d202f (patch)
tree8c89bc0a961e7a813a62aa751c2ad448393d840c /Source/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
parentb74a9cf2d2d336bcc08271d254cf4d725b4f3c96 (diff)
parent5319190a069ce6657577718a72e645dad45be0af (diff)
downloadexternal_webkit-5161915319ca55318d2ef68a84b735f01c3d202f.zip
external_webkit-5161915319ca55318d2ef68a84b735f01c3d202f.tar.gz
external_webkit-5161915319ca55318d2ef68a84b735f01c3d202f.tar.bz2
Merge "Fix memory leak caused by CSSRuleList wrapper"
Diffstat (limited to 'Source/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp')
-rw-r--r--Source/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp b/Source/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
index af81a41..fa915b6 100644
--- a/Source/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
@@ -161,22 +161,27 @@ static v8::Handle<v8::Value> toV8Object(WebGLExtension* extension, v8::Handle<v8
if (!extension)
return v8::Null();
v8::Handle<v8::Value> extensionObject;
+ const char* referenceName;
switch (extension->getName()) {
case WebGLExtension::WebKitLoseContextName:
extensionObject = toV8(static_cast<WebKitLoseContext*>(extension));
+ referenceName = "webKitLoseContextName";
break;
case WebGLExtension::OESStandardDerivativesName:
extensionObject = toV8(static_cast<OESStandardDerivatives*>(extension));
+ referenceName = "oesStandardDerivativesName";
break;
case WebGLExtension::OESTextureFloatName:
extensionObject = toV8(static_cast<OESTextureFloat*>(extension));
+ referenceName = "oesTextureFloatName";
break;
case WebGLExtension::OESVertexArrayObjectName:
extensionObject = toV8(static_cast<OESVertexArrayObject*>(extension));
+ referenceName = "oesVertexArrayObjectName";
break;
}
ASSERT(!extensionObject.IsEmpty());
- V8DOMWrapper::setHiddenReference(contextObject, extensionObject);
+ V8DOMWrapper::setNamedHiddenReference(contextObject, referenceName, extensionObject);
return extensionObject;
}