Chromium Code Reviews| Index: chrome/test/data/webui/net_internals/prerender_view.js |
| =================================================================== |
| --- chrome/test/data/webui/net_internals/prerender_view.js (revision 201078) |
| +++ chrome/test/data/webui/net_internals/prerender_view.js (working copy) |
| @@ -98,6 +98,10 @@ |
| if (this.state_ == STATE.START_PRERENDERING) { |
| this.startPrerendering_(prerenderInfo); |
| } else if (this.state_ == STATE.NEED_NAVIGATE) { |
| + // Can't safely swap in a prerender until the main frame has committed. |
| + // Waiting until the load has completed isn't necessary, but it's simpler. |
| + if (!prerenderInfo.active[0].is_loaded) |
|
eroman
2013/05/29 16:45:38
is it a given that active[0] exists?
mmenke
2013/05/29 17:11:28
Yes.
The first call to this function is when ther
|
| + return; |
| this.navigate_(prerenderInfo); |
| } else if (this.state_ == STATE.HISTORY_WAIT) { |
| this.checkDone_(prerenderInfo); |