WebKit Bugzilla
Attachment 370088 Details for
Bug 197968
: REGRESSION (r15133): Fix leak of JSStringRef in minidom
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch v1
bug-197968-20190516163024.patch (text/plain), 3.11 KB, created by
David Kilzer (:ddkilzer)
on 2019-05-16 16:30:25 PDT
(
hide
)
Description:
Patch v1
Filename:
MIME Type:
Creator:
David Kilzer (:ddkilzer)
Created:
2019-05-16 16:30:25 PDT
Size:
3.11 KB
patch
obsolete
>Subversion Revision: 245366 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 5b4da472e0ce993c154193f9b8fee4044e796e59..9769b02cef3a98f98904d16d02e45520a83aafc5 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,14 @@ >+2019-05-16 David Kilzer <ddkilzer@apple.com> >+ >+ REGRESSION (r15133): Fix leak of JSStringRef in minidom >+ <https://webkit.org/b/197968> >+ <rdar://problem/50872430> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * API/tests/minidom.c: >+ (print): Call JSStringRelease() to fix the leak. >+ > 2019-05-15 Saam Barati <sbarati@apple.com> > > Bound liveness of SetArgumentMaybe nodes when maximal flush insertion phase is enabled >diff --git a/Source/JavaScriptCore/API/tests/minidom.c b/Source/JavaScriptCore/API/tests/minidom.c >index 41f18cdf729043690cfe773ba40d8b5b44ca7098..6ebb399ac0b98518a1431564ef05b98be7a0f5b1 100644 >--- a/Source/JavaScriptCore/API/tests/minidom.c >+++ b/Source/JavaScriptCore/API/tests/minidom.c >@@ -91,6 +91,7 @@ static JSValueRef print(JSContextRef context, JSObjectRef object, JSObjectRef th > char stringUTF8[numChars]; > JSStringGetUTF8CString(string, stringUTF8, numChars); > printf("%s\n", stringUTF8); >+ JSStringRelease(string); > } > > return JSValueMakeUndefined(context); >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index d97863a0f8515a56c609abe37fa4202c6981a3bc..b295b0cb15357a7d96fe4e1c74d6b9a46dac1e9d 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,15 @@ >+2019-05-16 David Kilzer <ddkilzer@apple.com> >+ >+ REGRESSION (r15133): Fix leak of JSStringRef in minidom >+ <https://webkit.org/b/197968> >+ <rdar://problem/50872430> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * TestWebKitAPI/Tests/WebKitObjC/UserContentTest.mm: >+ (expectScriptValueIsString): Drive-by fix to use adopt() instead >+ of JSRetainPtr<JSStringRef> string(Adopt, JSValueToStringCopy(...)). >+ > 2019-05-16 David Kilzer <ddkilzer@apple.com> > > REGRESSION (r84160): Leak of OpaqueJSString under WTR::JSTestRunner::pathToLocalResource (32 bytes) in com.apple.WebKit.WebContent running layout tests >diff --git a/Tools/TestWebKitAPI/Tests/WebKitObjC/UserContentTest.mm b/Tools/TestWebKitAPI/Tests/WebKitObjC/UserContentTest.mm >index b63d1d668a72d5f71d0be0d291c7a6ea21238e70..4fba91fd4807714a92e772be77eeb2babbde504f 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitObjC/UserContentTest.mm >+++ b/Tools/TestWebKitAPI/Tests/WebKitObjC/UserContentTest.mm >@@ -77,7 +77,7 @@ static void expectScriptValueIsString(WKSerializedScriptValueRef serializedScrip > JSValueRef scriptValue = WKSerializedScriptValueDeserialize(serializedScriptValue, scriptContext, 0); > EXPECT_TRUE(JSValueIsString(scriptContext, scriptValue)); > >- JSRetainPtr<JSStringRef> scriptString(Adopt, JSValueToStringCopy(scriptContext, scriptValue, 0)); >+ auto scriptString = adopt(JSValueToStringCopy(scriptContext, scriptValue, 0)); > EXPECT_TRUE(JSStringIsEqualToUTF8CString(scriptString.get(), expectedValue)); > > JSGlobalContextRelease(scriptContext);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197968
: 370088