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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2260383002: Don't crash after calling frame_->stopLoading(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 429c817d472f975d5f8113cf3f5b143d0f48ea20..c4ab0ba0599ab15f003bbf41bf5042a3671bf386 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4500,7 +4500,7 @@ void RenderFrameImpl::RemoveObserver(RenderFrameObserver* observer) {
void RenderFrameImpl::OnStop() {
DCHECK(frame_);
frame_->stopLoading();
- if (!frame_->parent())
+ if (frame_ && !frame_->parent())
FOR_EACH_OBSERVER(RenderViewObserver, render_view_->observers_, OnStop());
FOR_EACH_OBSERVER(RenderFrameObserver, observers_, OnStop());
@@ -5653,7 +5653,7 @@ void RenderFrameImpl::NavigateInternal(
// send a stop message if the HistoryController is loading in this frame
// nonetheless. This behavior will go away with subframe navigation
// entries.
- if (!frame_->isLoading() && !has_history_navigation_in_frame)
+ if (frame_ && !frame_->isLoading() && !has_history_navigation_in_frame)
Send(new FrameHostMsg_DidStopLoading(routing_id_));
}
« 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