Bug 171408 - Teach WebProcessPool to track a map of SessionIDs to WebPageProxys to manage their lifetime
Summary: Teach WebProcessPool to track a map of SessionIDs to WebPageProxys to manage ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords:
Depends on: 172615
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-27 17:22 PDT by Brady Eidson
Modified: 2017-05-25 15:28 PDT (History)
3 users (show)

See Also:


Attachments
Patch (9.69 KB, patch)
2017-04-27 21:53 PDT, Brady Eidson
no flags Details | Formatted Diff | Diff
Patch (9.70 KB, patch)
2017-04-27 22:28 PDT, Brady Eidson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2017-04-27 17:22:29 PDT
Teach WebProcessPool to track a map of SessionIDs to WebPageProxys to manage their lifetime
Comment 1 Brady Eidson 2017-04-27 21:53:39 PDT
Created attachment 308503 [details]
Patch
Comment 2 Alex Christensen 2017-04-27 22:26:40 PDT
Comment on attachment 308503 [details]
Patch

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

> Source/WebKit2/UIProcess/WebProcessPool.cpp:954
> +        // FIXME: Remove this ASSERT and change these messages once multiple persistent sessions exist.
> +        ASSERT(sessionID.isEphemeral());
> +        networkProcess()->send(Messages::NetworkProcess::DestroyPrivateBrowsingSession(sessionID), 0);
> +        page.process().send(Messages::WebProcess::DestroyPrivateBrowsingSession(sessionID), 0);

I guess we'll also rename DestroyPrivateBrowsingSession to DestroySession, right?

> Source/WebKit2/UIProcess/WebProcessProxy.cpp:293
> +    auto removedPage = m_pageMap.take(pageID);

auto*
Comment 3 Brady Eidson 2017-04-27 22:27:40 PDT
(In reply to Alex Christensen from comment #2)
> Comment on attachment 308503 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=308503&action=review
> 
> > Source/WebKit2/UIProcess/WebProcessPool.cpp:954
> > +        // FIXME: Remove this ASSERT and change these messages once multiple persistent sessions exist.
> > +        ASSERT(sessionID.isEphemeral());
> > +        networkProcess()->send(Messages::NetworkProcess::DestroyPrivateBrowsingSession(sessionID), 0);
> > +        page.process().send(Messages::WebProcess::DestroyPrivateBrowsingSession(sessionID), 0);
> 
> I guess we'll also rename DestroyPrivateBrowsingSession to DestroySession,
> right?

Yup.

> 
> > Source/WebKit2/UIProcess/WebProcessProxy.cpp:293
> > +    auto removedPage = m_pageMap.take(pageID);
> 
> auto*

Sure.
Comment 4 Brady Eidson 2017-04-27 22:28:53 PDT
Created attachment 308505 [details]
Patch
Comment 5 Brady Eidson 2017-04-27 22:29:25 PDT
Will cq+ after EWS starts to look green
Comment 6 Brady Eidson 2017-04-27 23:35:32 PDT
EWS is unhappy with 215916 I think
Comment 7 WebKit Commit Bot 2017-04-28 00:04:19 PDT
Comment on attachment 308505 [details]
Patch

Clearing flags on attachment: 308505

Committed r215923: <http://trac.webkit.org/changeset/215923>
Comment 8 WebKit Commit Bot 2017-04-28 00:04:21 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Geoffrey Garen 2017-04-28 08:00:10 PDT
Comment on attachment 308505 [details]
Patch

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

> Source/WebKit2/UIProcess/API/APIPageConfiguration.cpp:160
> +#if !ASSERT_DISABLED
> +    if (m_websiteDataStore)
> +        ASSERT(m_websiteDataStore->websiteDataStore().sessionID() == m_sessionID);
> +#endif

You can ASSERT(!m_websiteDataStore || ...) to avoid the #ifdef.