Bug 192099 - Fix unnecessary call to [NSApplication sharedApplication]
Summary: Fix unnecessary call to [NSApplication sharedApplication]
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Local Build
Hardware: Mac macOS 10.14
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-11-28 13:33 PST by Suresh Koppisetty
Modified: 2018-12-03 10:32 PST (History)
4 users (show)

See Also:


Attachments
Patch (1.72 KB, patch)
2018-11-28 13:40 PST, Suresh Koppisetty
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Suresh Koppisetty 2018-11-28 13:33:31 PST
[NSApplication sharedApplication] call is no longer needed in platformInitializeWebProcess as [NSApplication _accessibilityInitialize] will call [NSApplication sharedApplication].
Comment 1 Suresh Koppisetty 2018-11-28 13:40:23 PST
Created attachment 355912 [details]
Patch
Comment 2 Geoffrey Garen 2018-11-29 11:34:23 PST
Comment on attachment 355912 [details]
Patch

r=me
Comment 3 WebKit Commit Bot 2018-11-29 11:59:50 PST
Comment on attachment 355912 [details]
Patch

Clearing flags on attachment: 355912

Committed r238681: <https://trac.webkit.org/changeset/238681>
Comment 4 WebKit Commit Bot 2018-11-29 11:59:52 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2018-11-29 12:01:30 PST
<rdar://problem/46349668>
Comment 6 Darin Adler 2018-12-02 16:12:26 PST
Comment on attachment 355912 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=355912&action=review

> Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:187
>      // Currently, it is also needed to allocate and initialize an NSApplication object.

The patch should have removed this comment, too. It now makes no sense!
Comment 7 Suresh Koppisetty 2018-12-03 10:32:12 PST
Comment on attachment 355912 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=355912&action=review

>> Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:187
>>      // Currently, it is also needed to allocate and initialize an NSApplication object.
> 
> The patch should have removed this comment, too. It now makes no sense!

I think the statement still makes sense as [NSApplication _accessibilityInitialize] allocates and initializes an NSApplication object before doing the accessibility initialization.

This patch only removes the double call to [NSApplication sharedApplication], not the dependency of initializing an NSApplication object.