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

Unified Diff: chrome/renderer/plugins/chrome_plugin_placeholder.cc

Issue 2845413002: Plugin Power Saver: Add missing RenderFrame null-checks in placeholders (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | components/plugins/renderer/loadable_plugin_placeholder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/plugins/chrome_plugin_placeholder.cc
diff --git a/chrome/renderer/plugins/chrome_plugin_placeholder.cc b/chrome/renderer/plugins/chrome_plugin_placeholder.cc
index 028a70bfda852f87fee99f427febca3de7fe070e..e6d97d705f80495e875b87a3c187bae2e930a84f 100644
--- a/chrome/renderer/plugins/chrome_plugin_placeholder.cc
+++ b/chrome/renderer/plugins/chrome_plugin_placeholder.cc
@@ -289,6 +289,8 @@ void ChromePluginPlaceholder::ShowContextMenu(
const blink::WebMouseEvent& event) {
if (context_menu_request_id_)
return; // Don't allow nested context menu requests.
+ if (!render_frame())
+ return;
content::ContextMenuParams params;
@@ -361,6 +363,7 @@ blink::WebPlugin* ChromePluginPlaceholder::CreatePlugin() {
}
void ChromePluginPlaceholder::OnBlockedTinyContent() {
+ DCHECK(render_frame());
if (did_send_blocked_content_notification_)
return;
« no previous file with comments | « no previous file | components/plugins/renderer/loadable_plugin_placeholder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698