Closed Bug 1152396 Opened 9 years ago Closed 9 years ago

Use WKProcessPool for cookies to allow for sane sign-in behavior across tabs

Categories

(Firefox for iOS :: General, defect)

All
iOS 8
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fennec + ---

People

(Reporter: bnicholson, Assigned: st3fan)

Details

Attachments

(1 file)

Currently, if you open a Gmail tab and sign in, then open a new Gmail tab, you won't be signed in immediately. After waiting a few seconds and refreshing, you are signed in.

This likely happens because the cookies are currently managed in each WKWebView process, so changes aren't propagated immediately. Using a WKProcessPool should fix this.
tracking-fennec: ? → +
There's some sample code here for creating a singleton process pool for this exact reason:

http://atmarkplant.com/ios-wkwebview-tips/
Assignee: nobody → sarentz
This patch lets the TabManager manage a global WKWebViewConfiguration with a single WKProcessPool. All tabs that do not explicitly specify a custom WKWebViewConfiguration when created will use this shared one.

We only have one TabManager instance in the application, which is why I decided to put this logic here.
Attachment #8594850 - Flags: review?(wjohnston)
Good test case:

Try this, with and without this patch:

1) Open a new tab
2) Login to news.ycombinator.com (or any site)
3) Open a new tab
4) See that you are logged in

The last step fails without this patch.
Summary: Use WKProcessPool for cookies → Use WKProcessPool for cookies to allow for sane sign-in behavior across tabs
Comment on attachment 8594850 [details] [review]
PR: https://github.com/mozilla/firefox-ios/pull/353

I'm a little nervous about sharing a configuration, but I don't see anything in it that we wouldn't want shared, so maybe its fine...
Attachment #8594850 - Flags: review?(wjohnston) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: