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

Unified Diff: content/renderer/render_view_impl.cc

Issue 8468032: Fix next_page_id_ in a NTP forced to share an existing WebUI process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Switch to UpdateAndSendMaxPageID Created 9 years, 1 month 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/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 80ea6e29f31a23c7a3b08c811d9361d99eff3205..607d8516acaa06792bd99d1c32dc91870ccdc5a4 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -498,11 +498,12 @@ RenderViewImpl* RenderViewImpl::Create(
// static
void RenderViewImpl::SetNextPageID(int32 next_page_id) {
- // This method should only be called during process startup, and the given
- // page id had better not exceed our current next page id!
- DCHECK_EQ(next_page_id_, 1);
- DCHECK(next_page_id >= next_page_id_);
- next_page_id_ = next_page_id;
+ // This method is called on startup or when the browser knows it needs to
+ // inflate the page_id when re-using the process. The renderer may have
+ // incremented this just as the browser was sending the message, but we
+ // only care that next_page_id_ is at least as large as next_page_id.
+ if (next_page_id > next_page_id_)
+ next_page_id_ = next_page_id;
}
void RenderViewImpl::AddObserver(RenderViewObserver* observer) {
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698