Title: [100409] trunk/Tools
- Revision
- 100409
- Author
- [email protected]
- Date
- 2011-11-15 22:46:48 -0800 (Tue, 15 Nov 2011)
Log Message
DRT's uiElementAttributeValueCallback function is leaky
https://bugs.webkit.org/show_bug.cgi?id=72453
Reviewed by Dan Bernstein.
* DumpRenderTree/AccessibilityUIElement.cpp:
(uiElementAttributeValueCallback): Use JSRetainPtr and don't leak.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (100408 => 100409)
--- trunk/Tools/ChangeLog 2011-11-16 06:46:27 UTC (rev 100408)
+++ trunk/Tools/ChangeLog 2011-11-16 06:46:48 UTC (rev 100409)
@@ -1,3 +1,13 @@
+2011-11-15 Darin Adler <[email protected]>
+
+ DRT's uiElementAttributeValueCallback function is leaky
+ https://bugs.webkit.org/show_bug.cgi?id=72453
+
+ Reviewed by Dan Bernstein.
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (uiElementAttributeValueCallback): Use JSRetainPtr and don't leak.
+
2011-11-14 Ryosuke Niwa <[email protected]>
Implement edit-distance based reviewer recognition algorithm
Modified: trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp (100408 => 100409)
--- trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp 2011-11-16 06:46:27 UTC (rev 100408)
+++ trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp 2011-11-16 06:46:48 UTC (rev 100409)
@@ -376,11 +376,11 @@
static JSValueRef uiElementAttributeValueCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
- JSStringRef attribute = 0;
+ JSRetainPtr<JSStringRef> attribute;
if (argumentCount == 1)
- attribute = JSValueToStringCopy(context, arguments[0], exception);
+ attribute.adopt(JSValueToStringCopy(context, arguments[0], exception));
- return AccessibilityUIElement::makeJSAccessibilityUIElement(context, toAXElement(thisObject)->uiElementAttributeValue(attribute));
+ return AccessibilityUIElement::makeJSAccessibilityUIElement(context, toAXElement(thisObject)->uiElementAttributeValue(attribute.get()));
}
static JSValueRef numberAttributeValueCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes