Commit 0926126d authored by raymes's avatar raymes Committed by Commit bot

Check if the RenderView is alive before setting the plugin find handler

Presumably during destruction, the RenderView can be destroyed before
the RenderFrame (since it only holds a weak pointer to it). We need
to check whether it is alive before clearing the plugin find handler.

BUG=487146

Review URL: https://codereview.chromium.org/1123393004

Cr-Commit-Position: refs/heads/master@{#330320}
parent 461a6f00
...@@ -663,7 +663,7 @@ v8::Local<v8::Context> PepperPluginInstanceImpl::GetMainWorldContext() { ...@@ -663,7 +663,7 @@ v8::Local<v8::Context> PepperPluginInstanceImpl::GetMainWorldContext() {
void PepperPluginInstanceImpl::Delete() { void PepperPluginInstanceImpl::Delete() {
is_deleted_ = true; is_deleted_ = true;
if (render_frame_ && if (render_frame_ && render_frame_->render_view() &&
render_frame_->render_view()->plugin_find_handler() == this) { render_frame_->render_view()->plugin_find_handler() == this) {
render_frame_->render_view()->set_plugin_find_handler(NULL); render_frame_->render_view()->set_plugin_find_handler(NULL);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment