Bug 109917

Summary: [WK2][EFL] WebPageProxy::setThemePath() should check that the page is valid
Product: WebKit Reporter: Mikhail Pozdnyakov <mikhail.pozdnyakov>
Component: WebKit EFLAssignee: Mikhail Pozdnyakov <mikhail.pozdnyakov>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, ap, benjamin, gyuyoung.kim, kenneth, lucas.de.marchi, rakuco, ryuan.choi, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch none

Description Mikhail Pozdnyakov 2013-02-15 02:17:10 PST
WebPageProxy::setThemePath() should check that the page is valid before sending IPC message.
Comment 1 Mikhail Pozdnyakov 2013-02-15 02:20:21 PST
Created attachment 188519 [details]
patch
Comment 2 Chris Dumez 2013-02-15 02:23:46 PST
Comment on attachment 188519 [details]
patch

LGTM.
Comment 3 Kenneth Rohde Christiansen 2013-02-15 04:28:37 PST
Comment on attachment 188519 [details]
patch

LGTM
Comment 4 Alexey Proskuryakov 2013-02-15 10:32:31 PST
Comment on attachment 188519 [details]
patch

Why? This breaks calling this method while the process is launching.
Comment 5 Anders Carlsson 2013-02-15 10:48:51 PST
(In reply to comment #4)
> (From update of attachment 188519 [details])
> Why? This breaks calling this method while the process is launching.

I don’t think this is true. isValid() will only return false if the page has been closed using WebPageProxy::closed(), or if the process has crashed and the page hasn’t been reattached to the new process yet.
Comment 6 Mikhail Pozdnyakov 2013-02-19 08:48:04 PST
(In reply to comment #5)
> (In reply to comment #4)
> > (From update of attachment 188519 [details] [details])
> > Why? This breaks calling this method while the process is launching.
> 
> I don’t think this is true. isValid() will only return false if the page has been closed using WebPageProxy::closed(), or if the process has crashed and the page hasn’t been reattached to the new process yet.

Indeed, it just should not allow send IPC messages if web process is not running any more. 
Most of WebPageProxy methods check isValid() before sending and return if it returns false, some methods are trying to re-launch the web process (for instance loadURL()) but this is not the desired behaviour for WebPageProxy::setThemePath() I guess.
Comment 7 Mikhail Pozdnyakov 2013-02-21 10:43:01 PST
Could please anyone review it?
Comment 8 WebKit Review Bot 2013-03-05 11:52:01 PST
Comment on attachment 188519 [details]
patch

Clearing flags on attachment: 188519

Committed r144794: <http://trac.webkit.org/changeset/144794>
Comment 9 WebKit Review Bot 2013-03-05 11:52:07 PST
All reviewed patches have been landed.  Closing bug.