Bug 103433

Summary: [WK2] WebPageProxy::relatedPages() cannot assume that this page is known to process
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: WebKit2Assignee: Alexey Proskuryakov <ap>
Severity: Normal CC: jberlin, sam
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
proposed fix jberlin: review+

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.

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.