Bug 233045 - Rename ProcessLauncherMac.mm to ProcessLauncherCocoa.mm
Summary: Rename ProcessLauncherMac.mm to ProcessLauncherCocoa.mm
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-11-12 08:26 PST by Chris Dumez
Modified: 2021-11-12 12:38 PST (History)
6 users (show)

See Also:


Attachments
Patch (37.73 KB, patch)
2021-11-12 08:27 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (36.25 KB, patch)
2021-11-12 11:28 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2021-11-12 08:26:25 PST
Rename ProcessLauncherMac.mm to ProcessLauncherDarwin.mm since this implementation is used by both macOS and iOS. I chose the Darwin naming (as opposed to the Cocoa one) because the implementation only relies on libXPC and Mach.
Comment 1 Chris Dumez 2021-11-12 08:27:41 PST
Created attachment 444070 [details]
Patch
Comment 2 Brent Fulgham 2021-11-12 08:39:27 PST
Comment on attachment 444070 [details]
Patch

Thank you for fixing this confusing naming. r=me!
Comment 3 EWS 2021-11-12 09:52:32 PST
Committed r285729 (244188@main): <https://commits.webkit.org/244188@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 444070 [details].
Comment 4 Radar WebKit Bug Importer 2021-11-12 09:53:21 PST
<rdar://problem/85347107>
Comment 5 Darin Adler 2021-11-12 10:51:38 PST
(In reply to Chris Dumez from comment #0)
> Rename ProcessLauncherMac.mm to ProcessLauncherDarwin.mm since this
> implementation is used by both macOS and iOS. I chose the Darwin naming (as
> opposed to the Cocoa one) because the implementation only relies on libXPC
> and Mach.

But still ".mm"? Seems like that relies on Objective-C, which we normally don’t require on non-Cocoa platforms.
Comment 6 Chris Dumez 2021-11-12 10:56:03 PST
(In reply to Darin Adler from comment #5)
> (In reply to Chris Dumez from comment #0)
> > Rename ProcessLauncherMac.mm to ProcessLauncherDarwin.mm since this
> > implementation is used by both macOS and iOS. I chose the Darwin naming (as
> > opposed to the Cocoa one) because the implementation only relies on libXPC
> > and Mach.
> 
> But still ".mm"? Seems like that relies on Objective-C, which we normally
> don’t require on non-Cocoa platforms.

Oh, I didn't realize we wanted cpp for Darwin files. I'll check if I can make it a cpp (or use Cocoa.mm naming).
Comment 7 Chris Dumez 2021-11-12 11:19:23 PST
(In reply to Chris Dumez from comment #6)
> (In reply to Darin Adler from comment #5)
> > (In reply to Chris Dumez from comment #0)
> > > Rename ProcessLauncherMac.mm to ProcessLauncherDarwin.mm since this
> > > implementation is used by both macOS and iOS. I chose the Darwin naming (as
> > > opposed to the Cocoa one) because the implementation only relies on libXPC
> > > and Mach.
> > 
> > But still ".mm"? Seems like that relies on Objective-C, which we normally
> > don’t require on non-Cocoa platforms.
> 
> Oh, I didn't realize we wanted cpp for Darwin files. I'll check if I can
> make it a cpp (or use Cocoa.mm naming).

Hmm, looks like I may need to use Cocoa.mm because of this line:
bool isWebKitDevelopmentBuild = ![[[[NSBundle bundleWithIdentifier:@"com.apple.WebKit"] bundlePath] stringByDeletingLastPathComponent] hasPrefix:systemDirectoryPath()];
Comment 8 Darin Adler 2021-11-12 11:20:09 PST
Makes sense. Certainly CFBundle and NSBundle are not part of Darwin. Anyway, no need for me to be super-nitpick-y about this.
Comment 9 Chris Dumez 2021-11-12 11:26:06 PST
Reopening for rename to Cocoa.mm
Comment 10 Chris Dumez 2021-11-12 11:26:19 PST
Reopening for rename to Cocoa.mm
Comment 11 Chris Dumez 2021-11-12 11:28:50 PST
Created attachment 444085 [details]
Patch
Comment 12 Brent Fulgham 2021-11-12 11:31:12 PST
Comment on attachment 444085 [details]
Patch

r=me
Comment 13 EWS 2021-11-12 12:38:19 PST
Committed r285737 (244196@main): <https://commits.webkit.org/244196@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 444085 [details].