Bug 103433 - [WK2] WebPageProxy::relatedPages() cannot assume that this page is known to process
Summary: [WK2] WebPageProxy::relatedPages() cannot assume that this page is known to p...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-11-27 09:58 PST by Alexey Proskuryakov
Modified: 2012-11-27 11:05 PST (History)
2 users (show)

See Also:


Attachments
proposed fix (1.61 KB, patch)
2012-11-27 10:04 PST, Alexey Proskuryakov
jberlin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2012-11-27 09:58:51 PST
pages() returns a list of pages in WebProcess, so this page may or may not be among them - a client can use a reference to WebPageProxy after the page has closed.

<rdar://problem/12619000>
Comment 1 Alexey Proskuryakov 2012-11-27 10:04:02 PST
Created attachment 176291 [details]
proposed fix
Comment 2 Alexey Proskuryakov 2012-11-27 10:37:19 PST
Committed <http://trac.webkit.org/r135879>.
Comment 3 Sam Weinig 2012-11-27 10:53:09 PST
Why not add an isClosed() check, and return null here?
Comment 4 Alexey Proskuryakov 2012-11-27 11:05:20 PST
That doesn't seem to a be a direct enough check - isClosed() may or may not return true if WebProcess has crashed.