WebKit Bugzilla
Attachment 362234 Details for
Bug 194761
: Leak of CFErrorRef objects (1.92 Kbytes) in com.apple.WebKit.WebContent.Development running WebKit layout tests on iOS Simulator
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch v1
bug-194761-20190217092834.patch (text/plain), 2.51 KB, created by
David Kilzer (:ddkilzer)
on 2019-02-17 09:28:36 PST
(
hide
)
Description:
Patch v1
Filename:
MIME Type:
Creator:
David Kilzer (:ddkilzer)
Created:
2019-02-17 09:28:36 PST
Size:
2.51 KB
patch
obsolete
>Subversion Revision: 241649 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 7fa03181a2306e134a0e17fc9dece45dd06e7f40..328d3314bdc56b6b861e47b8c38e26c3fb3effaf 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,17 @@ >+2019-02-17 David Kilzer <ddkilzer@apple.com> >+ >+ Leak of CFErrorRef objects (1.92 Kbytes) in com.apple.WebKit.WebContent.Development running WebKit layout tests on iOS Simulator >+ <https://webkit.org/b/194761> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm: >+ (WTR::activateSystemCoreWebFonts): Change `0` to `nullptr` for >+ CTFontManagerRegisterFontsForURL() error parameter. >+ (WTR::installFakeHelvetica): Pass nullptr into >+ CTFontManagerRegisterFontsForURL() to ignore any errors, thereby >+ fixing the leaks. >+ > 2018-12-10 David Kilzer <ddkilzer@apple.com> > > run-webkit-tests --leaks should run `leaks` on all com.apple.WebKit.* processes >diff --git a/Tools/WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm b/Tools/WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm >index 3d6adf623f7a26652c6ad4819bd1317f608bacca..6b5eaa88ed8f75f59eee06c2c514ff4ac147b5af 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm >+++ b/Tools/WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm >@@ -88,7 +88,7 @@ static void activateSystemCoreWebFonts() > // also activates e.g. Arial Unicode, which is not a variation of Arial. > for (NSString *coreWebFontName in coreWebFontNames) { > if ([fileName hasPrefix:coreWebFontName]) { >- CTFontManagerRegisterFontsForURL((CFURLRef)fontURL, kCTFontManagerScopeProcess, 0); >+ CTFontManagerRegisterFontsForURL((CFURLRef)fontURL, kCTFontManagerScopeProcess, nullptr); > break; > } > } >@@ -137,8 +137,7 @@ void installFakeHelvetica(WKStringRef configuration) > { > RetainPtr<CFStringRef> configurationString = adoptCF(WKStringCopyCFString(kCFAllocatorDefault, configuration)); > NSURL *resourceURL = [resourcesDirectoryURL() URLByAppendingPathComponent:[NSString stringWithFormat:@"FakeHelvetica-%@.ttf", configurationString.get()] isDirectory:NO]; >- CFErrorRef error = nullptr; >- CTFontManagerRegisterFontsForURL(static_cast<CFURLRef>(resourceURL), kCTFontManagerScopeProcess, &error); >+ CTFontManagerRegisterFontsForURL(static_cast<CFURLRef>(resourceURL), kCTFontManagerScopeProcess, nullptr); > } > > void uninstallFakeHelvetica()
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 194761
:
362234
|
362303
|
362389