| Index: content/browser/renderer_host/render_view_host_impl.cc
|
| diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
|
| index 516fc11dfbe9876c057212d060d21fbe75edf333..7ebf324b438e4069358c6c7d89901746737d22e6 100644
|
| --- a/content/browser/renderer_host/render_view_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_view_host_impl.cc
|
| @@ -207,6 +207,7 @@ RenderViewHostImpl::RenderViewHostImpl(
|
| waiting_for_drag_context_response_(false),
|
| enabled_bindings_(0),
|
| navigations_suspended_(false),
|
| + page_id_(-1),
|
| main_frame_routing_id_(main_frame_routing_id),
|
| run_modal_reply_msg_(NULL),
|
| run_modal_opener_id_(MSG_ROUTING_NONE),
|
| @@ -1175,6 +1176,7 @@ void RenderViewHostImpl::OnRenderProcessGone(int status, int exit_code) {
|
| }
|
|
|
| void RenderViewHostImpl::OnUpdateState(int32 page_id, const PageState& state) {
|
| + CHECK_EQ(page_id_, page_id);
|
| // Without this check, the renderer can trick the browser into using
|
| // filenames it can't access in a future session restore.
|
| if (!CanAccessFilesOfPageState(state)) {
|
| @@ -1182,19 +1184,20 @@ void RenderViewHostImpl::OnUpdateState(int32 page_id, const PageState& state) {
|
| return;
|
| }
|
|
|
| - delegate_->UpdateState(this, page_id, state);
|
| + delegate_->UpdateState(this, page_id_, state);
|
| }
|
|
|
| void RenderViewHostImpl::OnUpdateTitle(
|
| int32 page_id,
|
| const base::string16& title,
|
| blink::WebTextDirection title_direction) {
|
| + CHECK_EQ(page_id_, page_id);
|
| if (title.length() > kMaxTitleChars) {
|
| NOTREACHED() << "Renderer sent too many characters in title.";
|
| return;
|
| }
|
|
|
| - delegate_->UpdateTitle(this, page_id, title,
|
| + delegate_->UpdateTitle(this, page_id_, title,
|
| WebTextDirectionToChromeTextDirection(
|
| title_direction));
|
| }
|
| @@ -1204,8 +1207,9 @@ void RenderViewHostImpl::OnUpdateEncoding(const std::string& encoding_name) {
|
| }
|
|
|
| void RenderViewHostImpl::OnUpdateTargetURL(int32 page_id, const GURL& url) {
|
| + CHECK_EQ(page_id_, page_id);
|
| if (IsRVHStateActive(rvh_state_))
|
| - delegate_->UpdateTargetURL(page_id, url);
|
| + delegate_->UpdateTargetURL(page_id_, url);
|
|
|
| // Send a notification back to the renderer that we are ready to
|
| // receive more target urls.
|
| @@ -1240,7 +1244,8 @@ void RenderViewHostImpl::OnDocumentAvailableInMainFrame() {
|
|
|
| void RenderViewHostImpl::OnDocumentOnLoadCompletedInMainFrame(
|
| int32 page_id) {
|
| - delegate_->DocumentOnLoadCompletedInMainFrame(this, page_id);
|
| + CHECK_EQ(page_id_, page_id);
|
| + delegate_->DocumentOnLoadCompletedInMainFrame(this, page_id_);
|
| }
|
|
|
| void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) {
|
|
|