RESOLVED FIXED 169156
[iOS] The web process should inherit application state from UI process
https://bugs.webkit.org/show_bug.cgi?id=169156
Summary [iOS] The web process should inherit application state from UI process
Eric Carlson
Reported 2017-03-03 16:47:09 PST
The web process should inherit application state from UI process
Attachments
Proposed patch. (7.20 KB, patch)
2017-03-04 08:25 PST, Eric Carlson
ap: review+
ap: commit-queue-
Updated patch. (7.32 KB, patch)
2017-03-04 14:00 PST, Eric Carlson
no flags
Patch for landing. (4.68 KB, patch)
2017-03-14 08:58 PDT, Eric Carlson
beidson: review+
Patch for landing. (4.41 KB, patch)
2017-03-14 10:08 PDT, Eric Carlson
no flags
Radar WebKit Bug Importer
Comment 1 2017-03-03 16:49:26 PST
Eric Carlson
Comment 2 2017-03-04 08:25:08 PST
Created attachment 303394 [details] Proposed patch.
Jon Lee
Comment 3 2017-03-04 10:56:51 PST
Comment on attachment 303394 [details] Proposed patch. R=me but needs WK2 reviewer.
Alexey Proskuryakov
Comment 4 2017-03-04 11:34:53 PST
Comment on attachment 303394 [details] Proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=303394&action=review Only a shallow review, as I don't know about the overall design. > Source/WebKit2/Platform/spi/ios/CelestialSPI.h:25 > + #pragma once > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:118 > +SOFT_LINK_CONSTANT_MAY_FAIL(Celestial, AVSystemController_PIDToInheritApplicationStateFrom, NSString*) Misplaced star. > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:135 > + NSError* error; Please initialize the variable to nil. Also, misplaced star. > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:138 > + WTFLogAlways("Failed to set up PID proxying"); It may be useful to log the error.
Eric Carlson
Comment 5 2017-03-04 13:59:50 PST
Comment on attachment 303394 [details] Proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=303394&action=review >> Source/WebKit2/Platform/spi/ios/CelestialSPI.h:25 >> + > > #pragma once Fixed. >> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:118 >> +SOFT_LINK_CONSTANT_MAY_FAIL(Celestial, AVSystemController_PIDToInheritApplicationStateFrom, NSString*) > > Misplaced star. Fixed. >> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:135 >> + NSError* error; > > Please initialize the variable to nil. Also, misplaced star. Fixed. >> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:138 >> + WTFLogAlways("Failed to set up PID proxying"); > > It may be useful to log the error. Good idea, fixed.
Eric Carlson
Comment 6 2017-03-04 14:00:16 PST
Created attachment 303406 [details] Updated patch.
WebKit Commit Bot
Comment 7 2017-03-04 14:39:50 PST
Comment on attachment 303406 [details] Updated patch. Clearing flags on attachment: 303406 Committed r213430: <http://trac.webkit.org/changeset/213430>
mitz
Comment 8 2017-03-04 14:48:07 PST
Comment on attachment 303406 [details] Updated patch. View in context: https://bugs.webkit.org/attachment.cgi?id=303406&action=review > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:139 > + if (canLoadAVSystemController_PIDToInheritApplicationStateFrom()) { > + pid_t pid = WebProcess::singleton().presenterApplicationPid(); > + NSError *error = nil; > + [[getAVSystemControllerClass() sharedAVSystemController] setAttribute:@(pid) forKey:AVSystemController_PIDToInheritApplicationStateFrom error:&error]; > + if (error) > + WTFLogAlways("Failed to set up PID proxying: %s", [[error localizedDescription] UTF8String]); > + } Why are we doing global, pre-process setup in WebPage initialization rather than in web process initialization?
Eric Carlson
Comment 9 2017-03-14 08:58:44 PDT
Created attachment 304384 [details] Patch for landing. Address Dan's comments.
Brady Eidson
Comment 10 2017-03-14 09:22:46 PDT
Comment on attachment 304384 [details] Patch for landing. After bots are happy (they appear to not be!)
Eric Carlson
Comment 11 2017-03-14 10:08:27 PDT
Created attachment 304389 [details] Patch for landing.
WebKit Commit Bot
Comment 12 2017-03-14 13:03:36 PDT
Comment on attachment 304389 [details] Patch for landing. Clearing flags on attachment: 304389 Committed r213933: <http://trac.webkit.org/changeset/213933>
WebKit Commit Bot
Comment 13 2017-03-14 13:03:40 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.