|
re-use WebUIs
this is a partial revert of r133077 and an alternative fix for bug 121741. The last commit was faulty because a same-document navigate would not send new DocumentAvailableInFrame IPCs, hence all WebUISend messages would be ignored after a same document navigation. An example of a same-document navigation is when the user presses back, and the page handles window.onpopstate.
The new fix:
Re-use WebUI objects for navigations where we re-use the render view, and the old and new URLs return the same WebUIController type. This covers both the reload case and the same-document nav case. This way, the re-used WebUI is still initialized and is able to continue to handle messages without the possibility of unexpected messages causing crashes. WebUI re-builds on every back/forward/reload are also wasteful so this is a performance win.
BUG= 123705, 121741, 123710
TEST=
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=134055
Total comments: 27
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+150 lines, -169 lines) |
Patch |
 |
M |
chrome/browser/resources/options2/options_page.js
|
View
|
1
2
3
4
5
6
|
3 chunks |
+0 lines, -19 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/downloads_dom_handler.h
|
View
|
1
2
3
4
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/downloads_dom_handler.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/gpu_internals_ui.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+9 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/help/help_handler.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/net_internals/net_internals_ui.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+5 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/ntp/new_tab_ui.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+10 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/options2/options_ui2.h
|
View
|
1
2
3
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/options2/options_ui2.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+6 lines, -18 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/tracing_ui.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+9 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/uber/uber_ui.h
|
View
|
1
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/uber/uber_ui.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+0 lines, -7 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/render_view_host_impl.h
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/render_view_host_impl.cc
|
View
|
|
2 chunks |
+4 lines, -6 lines |
0 comments
|
Download
|
 |
M |
content/browser/web_contents/render_view_host_manager.h
|
View
|
1
2
3
4
5
6
7
8
9
|
4 chunks |
+21 lines, -6 lines |
0 comments
|
Download
|
 |
M |
content/browser/web_contents/render_view_host_manager.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
11 chunks |
+56 lines, -26 lines |
0 comments
|
Download
|
 |
M |
content/browser/web_contents/web_contents_impl.h
|
View
|
|
1 chunk |
+2 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/browser/web_contents/web_contents_impl.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+4 lines, -11 lines |
0 comments
|
Download
|
 |
M |
content/browser/webui/web_ui_impl.h
|
View
|
1
2
3
4
5
6
7
8
9
|
4 chunks |
+3 lines, -16 lines |
0 comments
|
Download
|
 |
M |
content/browser/webui/web_ui_impl.cc
|
View
|
|
2 chunks |
+0 lines, -12 lines |
0 comments
|
Download
|
 |
M |
content/common/view_messages.h
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+3 lines, -5 lines |
0 comments
|
Download
|
 |
M |
content/public/browser/render_view_host_delegate.h
|
View
|
|
1 chunk |
+3 lines, -5 lines |
0 comments
|
Download
|
 |
M |
content/public/browser/web_ui_controller.h
|
View
|
1
|
1 chunk |
+0 lines, -11 lines |
0 comments
|
Download
|
 |
M |
content/renderer/render_view_impl.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+2 lines, -4 lines |
0 comments
|
Download
|
Total messages: 21 (0 generated)
|