[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.18-1-697-g2f78b87
mrowe at apple.com
mrowe at apple.com
Wed Jan 20 22:16:32 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit ee4eeab4638cfef8a354789817d214a3f6cbd202
Author: mrowe at apple.com <mrowe at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jan 7 23:44:51 2010 +0000
Don't leak a JSStringRef within _accessibilityNotificationCallback.
Reviewed by Jon Honeycutt.
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(_accessibilityNotificationCallback): Have a JSRetainPtr adopt the JSStringRef so that it will be cleaned up
when it goes out of scope.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 408c83c..6f97cf7 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,13 @@
+2010-01-07 Mark Rowe <mrowe at apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ Don't leak a JSStringRef within _accessibilityNotificationCallback.
+
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (_accessibilityNotificationCallback): Have a JSRetainPtr adopt the JSStringRef so that it will be cleaned up
+ when it goes out of scope.
+
2010-01-07 Simon Fraser <simon.fraser at apple.com>
Reviewed by Darin Adler.
diff --git a/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm b/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
index 192e157..e6dfaf5 100644
--- a/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
+++ b/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
@@ -28,6 +28,7 @@
#import "AccessibilityUIElement.h"
#import <Foundation/Foundation.h>
+#import <JavaScriptCore/JSRetainPtr.h>
#import <JavaScriptCore/JSStringRef.h>
#import <JavaScriptCore/JSStringRefCF.h>
#import <WebKit/WebFrame.h>
@@ -759,8 +760,9 @@ static void _accessibilityNotificationCallback(id element, NSString* notificatio
{
if (!AXNotificationFunctionCallback)
return;
-
- JSValueRef argument = JSValueMakeString([mainFrame globalContext], JSStringCreateWithCFString((CFStringRef)notification));
+
+ JSRetainPtr<JSStringRef> jsNotification(Adopt, [notification createJSStringRef]);
+ JSValueRef argument = JSValueMakeString([mainFrame globalContext], jsNotification.get());
JSObjectCallAsFunction([mainFrame globalContext], AXNotificationFunctionCallback, NULL, 1, &argument, NULL);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list