Bug 178640

Summary: [iOS] WebProcess::initializeWebProcess spends ~150ms spinning up AVSystemController on some devices
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: WebRTCAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson, thorton, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Wenson Hsieh 2017-10-21 21:55:27 PDT
Optimizing this would improve web process bring-up time on certain devices.
Comment 1 Wenson Hsieh 2017-10-21 21:58:21 PDT
<rdar://problem/35113105>
Comment 2 Wenson Hsieh 2017-10-21 22:12:02 PDT
Created attachment 324517 [details]
Patch
Comment 3 youenn fablet 2017-10-22 18:45:21 PDT
Comment on attachment 324517 [details]
Patch

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

> Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:3421
> +        NSError *error = nil;

Is is usually style for mm file to do "NSError *error" in lieu of CPP like "NSError* error"?
Comment 4 Wenson Hsieh 2017-10-22 18:54:26 PDT
Comment on attachment 324517 [details]
Patch

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

Thanks for the review!

>> Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:3421
>> +        NSError *error = nil;
> 
> Is is usually style for mm file to do "NSError *error" in lieu of CPP like "NSError* error"?

Correct. It's this rule, in the WebKit style guidelines: <https://webkit.org/code-style-guidelines/#pointers-non-cpp>. Although, it seems a common interpretation of this rule (and an interpretation I personally find more useful :)) is that Objective C objects should have a space between the type and the *, while pointers to C++ and C classes and structs should not have an extra space. FWIW, this appears to be the convention followed here, in WebPageIOS.mm, as well as many other Objective-C++ files in WebKit (e.g. search for "FrameView*" in this file).
Comment 5 WebKit Commit Bot 2017-10-22 19:20:23 PDT
Comment on attachment 324517 [details]
Patch

Clearing flags on attachment: 324517

Committed r223827: <https://trac.webkit.org/changeset/223827>
Comment 6 WebKit Commit Bot 2017-10-22 19:20:24 PDT
All reviewed patches have been landed.  Closing bug.