[Webkit-unassigned] [Bug 109980] [WK2] Calls to WKPageLoadURL() when WebProcess was terminated may fail

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 22 18:33:37 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=109980





--- Comment #6 from Adenilson Cavalcanti Silva <savagobr at yahoo.com>  2013-02-22 18:35:59 PST ---
I think I figured it out what is happening. What would be expected is:

terminateProcess() --> loadURL() --> reattachtoWebProcess()

But what really is happening:

terminateProcess() --> loadURL() --> processDidCrash()


At the time that loadURL() is executed, the teardown of WebProcess is not completed yet (i.e. processDidCrash() hasn't executed).

While loading a URL, the test for the state of webProcess  is done calling isValid() that will return true (after all, it is set to false only at a later stage in processDidCrash()).

Simply forcing the execution of reattachToWebProcess() is not a solution, because execution flow will eventually return to processDidCrash(). Plus, it would fail in several points thanks to the fact that there is already associated receivers to the webProcess data structures.

I see at least 2 ways to deal with this scenario:

a) Have a flag to mark that we are in a undefined state (i.e. between terminateProcess() and processDidCrash(). That could be used by loadURL() to decide if/when to reattachToWebProcess() and later used by processDidCrash() to change the execution flow.

b) Move some (or most) of the teardown code in processDidCrash() to terminateProcess(). Not sure about the deep consequences of this (i.e. how long does it take to close connections, kill processes, etc) and how that would impact UIProcess.


Any ideas about this?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list