Bug 48153

Summary: Crash in Connection::isValid when called in response to VisitedLinksProvider::pendingVisitedLinksTimerFired after WebProcessPRoxy::didClose was already called
Product: WebKit Reporter: Jessie Berlin <jberlin>
Component: WebKit2Assignee: Jessie Berlin <jberlin>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, aroben, jberlin
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Add WebContext::proccessDidClose and stop the visited links timer there none

Description Jessie Berlin 2010-10-22 14:21:44 PDT
We should create a WebContext::webProcessDidClose method, have it stop the timer, and call that from WebContext::didClose.
Comment 1 Jessie Berlin 2010-10-22 14:29:46 PDT
Created attachment 71594 [details]
Add WebContext::proccessDidClose and stop the visited links timer there
Comment 2 Jessie Berlin 2010-10-22 14:36:10 PDT
<rdar://problem/8580585>
Comment 3 Anders Carlsson 2010-10-22 14:36:49 PDT
Comment on attachment 71594 [details]
Add WebContext::proccessDidClose and stop the visited links timer there

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

Looks great otherwise, r=me!

> WebKit2/UIProcess/WebProcessProxy.cpp:420
> +    m_context->processDidClose(this);

You should call processDidClose before the call to WebProcessManager::processDidClose because calling it might delete the WebProcessProxy object.
Comment 4 Jessie Berlin 2010-10-22 14:42:55 PDT
(In reply to comment #3)
> (From update of attachment 71594 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=71594&action=review
> 
> Looks great otherwise, r=me!
> 
> > WebKit2/UIProcess/WebProcessProxy.cpp:420
> > +    m_context->processDidClose(this);
> 
> You should call processDidClose before the call to WebProcessManager::processDidClose because calling it might delete the WebProcessProxy object.

Done.

Thanks for the review!
Comment 5 Jessie Berlin 2010-10-22 14:48:10 PDT
Comment on attachment 71594 [details]
Add WebContext::proccessDidClose and stop the visited links timer there

Committed in r70346
http://trac.webkit.org/changeset/70346
Comment 6 Adam Roben (:aroben) 2010-10-22 14:49:07 PDT
Is there any way to make a test for this?
Comment 7 Jessie Berlin 2010-10-22 16:39:19 PDT
(In reply to comment #6)
> Is there any way to make a test for this?

I don't think so at the moment. The case in which we are currently seeing this happen is not necessarily caused by the WebProcess crashing - more has to do with the timing of the WebProcess ending which is a bit hard to control.