Bug 102520 - [WK2] REGRESSION: After web process crash a new web process is created for every existing page
Summary: [WK2] REGRESSION: After web process crash a new web process is created for ev...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P1 Normal
Assignee: Nobody
URL:
Keywords: Regression
Depends on:
Blocks:
 
Reported: 2012-11-16 08:18 PST by Carlos Garcia Campos
Modified: 2012-11-18 03:19 PST (History)
3 users (show)

See Also:


Attachments
Patch (3.45 KB, patch)
2012-11-16 08:22 PST, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Updated patch (5.45 KB, patch)
2012-11-17 02:38 PST, Carlos Garcia Campos
ap: review+
ap: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2012-11-16 08:18:23 PST
Even when process model is SharedSecondaryProcess
Comment 1 Carlos Garcia Campos 2012-11-16 08:22:22 PST
Created attachment 174691 [details]
Patch
Comment 2 Alexey Proskuryakov 2012-11-16 10:11:19 PST
Comment on attachment 174691 [details]
Patch

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

Great catch!

> Source/WebKit2/UIProcess/WebContext.h:223
> +    PassRefPtr<WebProcessProxy> ensureWebProcess();

This function is quite confusing - there is no way one could figure out what it does without reading its code.

I could not come up with a better name or signature for it. Perhaps the logic can just be in WebPageProxy::reattachToWebProcess() inline?
Comment 3 Carlos Garcia Campos 2012-11-17 02:11:17 PST
(In reply to comment #2)
> (From update of attachment 174691 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=174691&action=review
> 
> Great catch!
> 
> > Source/WebKit2/UIProcess/WebContext.h:223
> > +    PassRefPtr<WebProcessProxy> ensureWebProcess();
> 
> This function is quite confusing - there is no way one could figure out what it does without reading its code.
> 
> I could not come up with a better name or signature for it. Perhaps the logic can just be in WebPageProxy::reattachToWebProcess() inline?

We would still need a way to get the shared process, because ensureSharedWebProcess() doesn't return the process and relaunchProcessIfNecessary is deprecated, right?
Comment 4 Carlos Garcia Campos 2012-11-17 02:38:12 PST
Created attachment 174816 [details]
Updated patch

Move the logic to WebPageProxy::reattachToWebProcess()
Comment 5 Alexey Proskuryakov 2012-11-17 21:09:49 PST
Comment on attachment 174816 [details]
Updated patch

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

> Source/WebKit2/UIProcess/WebContext.h:221
> +    PassRefPtr<WebProcessProxy> getOrCreateSharedWebProcess();

I think that this should still be called ensureSharedWebProcess, and return a plain pointer. There is no passing of ownership, so PassRefPtr is confusing.
Comment 6 Carlos Garcia Campos 2012-11-18 03:19:28 PST
Committed r135066: <http://trac.webkit.org/changeset/135066>