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

Unified Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 2369453004: Fix crash when a frame is detached while a PepperPluginInstance is being constructed. (Closed)
Patch Set: Created 4 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_plugin_instance_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
index 0baa32e1b2796778b62d20d085e3c136dc8ffc6e..ce91ee3a1b2f9ee7a708875ebe6fdb3f39508174 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
@@ -538,8 +538,8 @@ PepperPluginInstanceImpl::PepperPluginInstanceImpl(
memset(&current_print_settings_, 0, sizeof(current_print_settings_));
module_->InstanceCreated(this);
- if (render_frame) { // NULL in tests
- render_frame->PepperInstanceCreated(this);
+ if (render_frame_) { // NULL in tests or if the frame has been destroyed.
+ render_frame_->PepperInstanceCreated(this);
view_data_.is_page_visible = !render_frame_->GetRenderWidget()->is_hidden();
// Set the initial focus.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698