When loading a subframe in the non-PlzNavigate case, WebFrameClient receives the following callbacks:
- didStartProvisionalLoad() for the subframe (this occurs while parsing the document)
- didFinishDocumentLoad() (once parsing the document is finished)
However, in the PlzNavigate case the order of these callbacks is inverted. This occurs because during parsing of the document the renderer-initiated navigation to the subframe causes only an IPC to the browser to start the navigation. It is when the browser sends the message back to commit the navigation that the full load in FrameLoader.cpp::load() occurs and results in the callback to didStartProvisionalLoad().
One effect of this is that several layout tests fail under PlzNavigate because the output produced by these callbacks (via WebFrameTestClient) occurs in the opposite order to what they expected. It's unclear whether there are any more serious effects (i.e., whether production code also relies on the order of these callbacks).
Comment 1 by bugdroid1@chromium.org
, Aug 19 2016