Title: [261090] trunk/Source/WebKit
- Revision
- 261090
- Author
- [email protected]
- Date
- 2020-05-04 11:00:44 -0700 (Mon, 04 May 2020)
Log Message
TestWebKitAPI.WebKit.CustomDisplayName is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=211299
Patch by Alex Christensen <[email protected]> on 2020-05-04
Reviewed by Darin Adler.
The application name is being set on a background queue, but there's nothing actually keeping the NSString alive.
This may fix some timeouts we were seeing. I wonder why ASAN or guard malloc didn't catch this yet.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::updateProcessName):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (261089 => 261090)
--- trunk/Source/WebKit/ChangeLog 2020-05-04 18:00:42 UTC (rev 261089)
+++ trunk/Source/WebKit/ChangeLog 2020-05-04 18:00:44 UTC (rev 261090)
@@ -1,3 +1,16 @@
+2020-05-04 Alex Christensen <[email protected]>
+
+ TestWebKitAPI.WebKit.CustomDisplayName is a flaky timeout
+ https://bugs.webkit.org/show_bug.cgi?id=211299
+
+ Reviewed by Darin Adler.
+
+ The application name is being set on a background queue, but there's nothing actually keeping the NSString alive.
+ This may fix some timeouts we were seeing. I wonder why ASAN or guard malloc didn't catch this yet.
+
+ * WebProcess/cocoa/WebProcessCocoa.mm:
+ (WebKit::WebProcess::updateProcessName):
+
2020-05-04 Darin Adler <[email protected]>
Remove no-longer-needed HAVE(UISCENE)
Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (261089 => 261090)
--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2020-05-04 18:00:42 UTC (rev 261089)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2020-05-04 18:00:44 UTC (rev 261090)
@@ -383,7 +383,7 @@
void WebProcess::updateProcessName()
{
#if PLATFORM(MAC)
- NSString *applicationName;
+ RetainPtr<NSString> applicationName;
switch (m_processType) {
case ProcessType::Inspector:
applicationName = [NSString stringWithFormat:WEB_UI_STRING("%@ Web Inspector", "Visible name of Web Inspector's web process. The argument is the application name."), (NSString *)m_uiProcessName];
@@ -404,7 +404,7 @@
dispatch_async(dispatch_get_global_queue(QOS_CLASS_BACKGROUND, 0), ^{
// Note that it is important for _RegisterApplication() to have been called before setting the display name.
- auto error = _LSSetApplicationInformationItem(kLSDefaultSessionID, _LSGetCurrentApplicationASN(), _kLSDisplayNameKey, (CFStringRef)applicationName, nullptr);
+ auto error = _LSSetApplicationInformationItem(kLSDefaultSessionID, _LSGetCurrentApplicationASN(), _kLSDisplayNameKey, (CFStringRef)applicationName.get(), nullptr);
ASSERT(!error);
if (error) {
RELEASE_LOG_ERROR_IF_ALLOWED(Process, "updateProcessName: Failed to set the display name of the WebContent process, error code: %ld", static_cast<long>(error));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes