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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1070553005: Set frame liveness before calling RenderFrameCreated/RenderFrameDeleted. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@b444955
Patch Set: Rebase Created 5 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 | « content/browser/frame_host/frame_tree_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 6d899102f8ed1db25f849dffd8168f1666078d26..f98c38e31c7eb10f375afcf421b306ba368af9bf 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -623,16 +623,18 @@ bool RenderFrameHostImpl::IsRenderFrameLive() {
}
void RenderFrameHostImpl::SetRenderFrameCreated(bool created) {
+ bool was_created = render_frame_created_;
+ render_frame_created_ = created;
+
// If the current status is different than the new status, the delegate
// needs to be notified.
- if (delegate_ && (created != render_frame_created_)) {
+ if (delegate_ && (created != was_created)) {
if (created)
delegate_->RenderFrameCreated(this);
else
delegate_->RenderFrameDeleted(this);
}
- render_frame_created_ = created;
if (created && render_widget_host_)
render_widget_host_->InitForFrame();
}
« no previous file with comments | « content/browser/frame_host/frame_tree_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698