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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2862093002: Remove DCHECK that crashes.
Patch Set: Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after
1819 } 1819 }
1820 1820
1821 // While a JS message dialog is showing, tabs in the same process shouldn't 1821 // While a JS message dialog is showing, tabs in the same process shouldn't
1822 // process input events. 1822 // process input events.
1823 GetProcess()->SetIgnoreInputEvents(true); 1823 GetProcess()->SetIgnoreInputEvents(true);
1824 delegate_->RunJavaScriptDialog(this, message, default_prompt, frame_url, 1824 delegate_->RunJavaScriptDialog(this, message, default_prompt, frame_url,
1825 dialog_type, reply_msg); 1825 dialog_type, reply_msg);
1826 } 1826 }
1827 1827
1828 void RenderFrameHostImpl::OnRunBeforeUnloadConfirm( 1828 void RenderFrameHostImpl::OnRunBeforeUnloadConfirm(
1829 const GURL& frame_url,
1830 bool is_reload, 1829 bool is_reload,
1831 IPC::Message* reply_msg) { 1830 IPC::Message* reply_msg) {
1832 TRACE_EVENT1("navigation", "RenderFrameHostImpl::OnRunBeforeUnloadConfirm", 1831 TRACE_EVENT1("navigation", "RenderFrameHostImpl::OnRunBeforeUnloadConfirm",
1833 "frame_tree_node", frame_tree_node_->frame_tree_node_id()); 1832 "frame_tree_node", frame_tree_node_->frame_tree_node_id());
1834 1833
1835 // TODO(nasko): It is strange to accept the frame URL as a parameter from
1836 // the renderer. Investigate and remove parameter, but for now let's
1837 // double check.
1838 DCHECK_EQ(frame_url, last_committed_url_);
1839
1840 // While a JS beforeunload dialog is showing, tabs in the same process 1834 // While a JS beforeunload dialog is showing, tabs in the same process
1841 // shouldn't process input events. 1835 // shouldn't process input events.
1842 GetProcess()->SetIgnoreInputEvents(true); 1836 GetProcess()->SetIgnoreInputEvents(true);
1843 1837
1844 // The beforeunload dialog for this frame may have been triggered by a 1838 // The beforeunload dialog for this frame may have been triggered by a
1845 // browser-side request to this frame or a frame up in the frame hierarchy. 1839 // browser-side request to this frame or a frame up in the frame hierarchy.
1846 // Stop any timers that are waiting. 1840 // Stop any timers that are waiting.
1847 for (RenderFrameHostImpl* frame = this; frame; frame = frame->GetParent()) { 1841 for (RenderFrameHostImpl* frame = this; frame; frame = frame->GetParent()) {
1848 if (frame->beforeunload_timeout_) 1842 if (frame->beforeunload_timeout_)
1849 frame->beforeunload_timeout_->Stop(); 1843 frame->beforeunload_timeout_->Stop();
(...skipping 2051 matching lines...) Expand 10 before | Expand all | Expand 10 after
3901 } 3895 }
3902 3896
3903 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( 3897 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame(
3904 const std::string& interface_name, 3898 const std::string& interface_name,
3905 mojo::ScopedMessagePipeHandle pipe) { 3899 mojo::ScopedMessagePipeHandle pipe) {
3906 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); 3900 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe));
3907 } 3901 }
3908 #endif 3902 #endif
3909 3903
3910 } // namespace content 3904 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698