Changeset 245430 in webkit


Ignore:
Timestamp:
May 16, 2019 6:17:47 PM (5 years ago)
Author:
ddkilzer@apple.com
Message:

REGRESSION (r15133): Fix leak of JSStringRef in minidom
<https://webkit.org/b/197968>
<rdar://problem/50872430>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • API/tests/minidom.c:

(print): Call JSStringRelease() to fix the leak.

Tools:

  • TestWebKitAPI/Tests/WebKitObjC/UserContentTest.mm:

(expectScriptValueIsString): Drive-by fix to use adopt() instead
of JSRetainPtr<JSStringRef> string(Adopt, JSValueToStringCopy(...)).

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/tests/minidom.c

    r234227 r245430  
    9292        JSStringGetUTF8CString(string, stringUTF8, numChars);
    9393        printf("%s\n", stringUTF8);
     94        JSStringRelease(string);
    9495    }
    9596   
  • trunk/Source/JavaScriptCore/ChangeLog

    r245406 r245430  
     12019-05-16  David Kilzer  <ddkilzer@apple.com>
     2
     3        REGRESSION (r15133): Fix leak of JSStringRef in minidom
     4        <https://webkit.org/b/197968>
     5        <rdar://problem/50872430>
     6
     7        Reviewed by Joseph Pecoraro.
     8
     9        * API/tests/minidom.c:
     10        (print): Call JSStringRelease() to fix the leak.
     11
    1122019-05-16  Ross Kirsling  <ross.kirsling@sony.com>
    213
  • trunk/Tools/ChangeLog

    r245419 r245430  
     12019-05-16  David Kilzer  <ddkilzer@apple.com>
     2
     3        REGRESSION (r15133): Fix leak of JSStringRef in minidom
     4        <https://webkit.org/b/197968>
     5        <rdar://problem/50872430>
     6
     7        Reviewed by Joseph Pecoraro.
     8
     9        * TestWebKitAPI/Tests/WebKitObjC/UserContentTest.mm:
     10        (expectScriptValueIsString): Drive-by fix to use adopt() instead
     11        of JSRetainPtr<JSStringRef> string(Adopt, JSValueToStringCopy(...)).
     12
    1132019-05-16  David Kilzer  <ddkilzer@apple.com>
    214
  • trunk/Tools/TestWebKitAPI/Tests/WebKitObjC/UserContentTest.mm

    r242339 r245430  
    7878    EXPECT_TRUE(JSValueIsString(scriptContext, scriptValue));
    7979   
    80     JSRetainPtr<JSStringRef> scriptString(Adopt, JSValueToStringCopy(scriptContext, scriptValue, 0));
     80    auto scriptString = adopt(JSValueToStringCopy(scriptContext, scriptValue, 0));
    8181    EXPECT_TRUE(JSStringIsEqualToUTF8CString(scriptString.get(), expectedValue));
    8282   
Note: See TracChangeset for help on using the changeset viewer.