Bug 48654 - ASSERTION FAILURE in WebProcessProxy::frameDestroyed when a Page is closed before it can send the DidCreateMainFrame message to the UIProcess
Summary: ASSERTION FAILURE in WebProcessProxy::frameDestroyed when a Page is closed be...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Jessie Berlin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-10-29 12:05 PDT by Jessie Berlin
Modified: 2010-10-29 12:32 PDT (History)
3 users (show)

See Also:


Attachments
Remove the invalid assertion (1.96 KB, patch)
2010-10-29 12:18 PDT, Jessie Berlin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jessie Berlin 2010-10-29 12:05:26 PDT
WebProcessProxy::frameDestroyed asserts that the frameID it was called with was registered in WebProcessProxy::frameCreated (which is called when the WebPageProxy is created). However, in the case where we close the page before it's had the chance to send the DidCreateMainFrame message back to the UI process, the UI Process will get the DidDestroyFrame message because it's sent directly to the WebProcessProxy and doesn't go through WebPageProxy.

Therefore, the assert is invalid for that case and should be removed.

<rdar://problem/8600977>
Comment 1 Jessie Berlin 2010-10-29 12:18:19 PDT
Created attachment 72366 [details]
Remove the invalid assertion
Comment 2 Anders Carlsson 2010-10-29 12:26:04 PDT
Comment on attachment 72366 [details]
Remove the invalid assertion

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

> WebKit2/UIProcess/WebProcessProxy.cpp:492
> +        return;

You can remove the call to m_frameMap.contains here, m_frameMap.remove will work just fine even if the frame doesn't exist in the map and it will avoid an extra hash lookup.
Comment 3 Jessie Berlin 2010-10-29 12:28:24 PDT
(In reply to comment #2)
> (From update of attachment 72366 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=72366&action=review
> 
> > WebKit2/UIProcess/WebProcessProxy.cpp:492
> > +        return;
> 
> You can remove the call to m_frameMap.contains here, m_frameMap.remove will work just fine even if the frame doesn't exist in the map and it will avoid an extra hash lookup.

Done.
Comment 4 Jessie Berlin 2010-10-29 12:32:30 PDT
Comment on attachment 72366 [details]
Remove the invalid assertion

Commited in r70915
http://trac.webkit.org/changeset/70915