Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Unified Diff: content/browser/webui/web_ui_impl.cc

Issue 2041993002: WebUI: Fix lifecycle-bug when RenderFrameHost is swapped out (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/webui/web_ui_impl.h ('k') | content/public/browser/web_ui_message_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/webui/web_ui_impl.cc
diff --git a/content/browser/webui/web_ui_impl.cc b/content/browser/webui/web_ui_impl.cc
index 41fc037852c786645705881beed7ad9ca6d0e0fa..75779428e985c3d154fc8dad974475ee78a4f8d4 100644
--- a/content/browser/webui/web_ui_impl.cc
+++ b/content/browser/webui/web_ui_impl.cc
@@ -100,6 +100,11 @@ void WebUIImpl::RenderViewReused(RenderViewHost* render_view_host,
handler->RenderViewReused();
}
+void WebUIImpl::RenderFrameHostSwappingOut() {
+ for (WebUIMessageHandler* handler : handlers_)
+ handler->DisallowJavascript();
+}
+
WebContents* WebUIImpl::GetWebContents() const {
return web_contents_;
}
« no previous file with comments | « content/browser/webui/web_ui_impl.h ('k') | content/public/browser/web_ui_message_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698