Changeset 261206 in webkit
- Timestamp:
- May 5, 2020 4:52:48 PM (4 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r261203 r261206 1 2020-05-05 Chris Dumez <cdumez@apple.com> 2 3 Crash under _LSSetApplicationInformationItem() 4 https://bugs.webkit.org/show_bug.cgi?id=211478 5 <rdar://problem/62201314> 6 7 Reviewed by Alex Christensen. 8 9 Given the crashes, I suspect it is not actually safe to call _LSSetApplicationInformationItem() 10 from a non main-thread like it was done in r238289. We still run the code asynchronously to 11 address the issue that r238289 was trying to fix but we now call _LSSetApplicationInformationItem() 12 on the main thread. 13 14 * WebProcess/cocoa/WebProcessCocoa.mm: 15 (WebKit::WebProcess::updateProcessName): 16 (WebKit::WebProcess::updateActivePages): 17 (WebKit::setProcessNameQueue): Deleted. 18 1 19 2020-05-05 Peng Liu <peng.liu6@apple.com> 2 20 -
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
r261145 r261206 381 381 } 382 382 383 #if PLATFORM(MAC)384 static WorkQueue& setProcessNameQueue()385 {386 static NeverDestroyed<Ref<WorkQueue>> queue(WorkQueue::create("setProcessNameQueue"));387 return queue.get().get();388 }389 #endif390 391 383 void WebProcess::updateProcessName() 392 384 { … … 411 403 } 412 404 413 setProcessNameQueue().dispatch([this, applicationName = WTFMove(applicationName)] {405 RunLoop::main().dispatch([this, applicationName = WTFMove(applicationName)] { 414 406 // Note that it is important for _RegisterApplication() to have been called before setting the display name. 415 407 auto error = _LSSetApplicationInformationItem(kLSDefaultSessionID, _LSGetCurrentApplicationASN(), _kLSDisplayNameKey, (CFStringRef)applicationName.get(), nullptr); … … 679 671 #if PLATFORM(MAC) 680 672 if (!overrideDisplayName) { 681 setProcessNameQueue().dispatch([activeOrigins = activePagesOrigins(m_pageMap)] {673 RunLoop::main().dispatch([activeOrigins = activePagesOrigins(m_pageMap)] { 682 674 _LSSetApplicationInformationItem(kLSDefaultSessionID, _LSGetCurrentApplicationASN(), CFSTR("LSActivePageUserVisibleOriginsKey"), (__bridge CFArrayRef)activeOrigins.get(), nullptr); 683 675 }); 684 676 } else { 685 setProcessNameQueue().dispatch([name = overrideDisplayName.createCFString()] {677 RunLoop::main().dispatch([name = overrideDisplayName.createCFString()] { 686 678 _LSSetApplicationInformationItem(kLSDefaultSessionID, _LSGetCurrentApplicationASN(), _kLSDisplayNameKey, name.get(), nullptr); 687 679 });
Note: See TracChangeset
for help on using the changeset viewer.