[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

mrowe at apple.com mrowe at apple.com
Thu Apr 8 00:57:56 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 39391543e3bfb88383a67c0f11e87317fd13eb21
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