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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 1421483005: Reland: Remove DCHECK_IMPLIES/CHECK_IMPLIES. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/renderer/input/input_handler_proxy.cc ('k') | content/test/test_render_frame_host.cc » ('j') | 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 623fd1679c52b25ea070f4fb974b3ecbe4f00856..5485ee706e7eeabb8246dbb6788fd44a549aadd4 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -644,14 +644,14 @@ void RenderFrameImpl::CreateFrame(
replicated_state.sandbox_flags);
}
render_frame->SetWebFrame(web_frame);
- CHECK_IMPLIES(parent_routing_id == MSG_ROUTING_NONE, !web_frame->parent());
+ CHECK(parent_routing_id != MSG_ROUTING_NONE || !web_frame->parent());
WebFrame* opener = ResolveOpener(opener_routing_id, nullptr);
web_frame->setOpener(opener);
if (widget_params.routing_id != MSG_ROUTING_NONE) {
- CHECK_IMPLIES(web_frame->parent(),
- SiteIsolationPolicy::AreCrossProcessFramesPossible());
+ CHECK(!web_frame->parent() ||
+ SiteIsolationPolicy::AreCrossProcessFramesPossible());
render_frame->render_widget_ = RenderWidget::CreateForFrame(
widget_params.routing_id, widget_params.hidden,
render_frame->render_view_->screen_info(), compositor_deps, web_frame);
@@ -1256,8 +1256,7 @@ void RenderFrameImpl::OnSwapOut(
SiteIsolationPolicy::IsSwappedOutStateForbidden();
// This codepath should only be hit for subframes when in --site-per-process.
- CHECK_IMPLIES(!is_main_frame_,
- SiteIsolationPolicy::AreCrossProcessFramesPossible());
+ CHECK(is_main_frame_ || SiteIsolationPolicy::AreCrossProcessFramesPossible());
// Only run unload if we're not swapped out yet, but send the ack either way.
if (!is_swapped_out_) {
@@ -2677,7 +2676,7 @@ void RenderFrameImpl::didStartProvisionalLoad(blink::WebLocalFrame* frame,
DocumentState* document_state = DocumentState::FromDataSource(ds);
// We should only navigate to swappedout:// when is_swapped_out_ is true.
- CHECK_IMPLIES(ds->request().url() == GURL(kSwappedOutURL), is_swapped_out_)
+ CHECK(ds->request().url() != GURL(kSwappedOutURL) || is_swapped_out_)
<< "Heard swappedout:// when not swapped out.";
// Update the request time if WebKit has better knowledge of it.
@@ -2843,9 +2842,8 @@ void RenderFrameImpl::didCommitProvisionalLoad(
// SendUpdateState and update page_id_ even in this case, so that
// the current entry gets a state update and so that we don't send a
// state update to the wrong entry when we swap back in.
- DCHECK_IMPLIES(
- navigation_state->common_params().should_replace_current_entry,
- render_view_->history_list_length_ > 0);
+ DCHECK(!navigation_state->common_params().should_replace_current_entry ||
+ render_view_->history_list_length_ > 0);
if (GetLoadingUrl() != GURL(kSwappedOutURL) &&
!navigation_state->common_params().should_replace_current_entry) {
// Advance our offset in session history, applying the length limit.
@@ -4008,7 +4006,7 @@ void RenderFrameImpl::WasShown() {
// VisibilityState remain a page-level concept or move to frames?
// The semantics of 'Show' might have to change here.
// TODO(avi): This DCHECK is to track cleanup for https://crbug.com/545684
- DCHECK_IMPLIES(IsMainFrame(), render_widget_.get() == render_view_.get())
+ DCHECK(!IsMainFrame() || render_widget_.get() == render_view_.get())
<< "The main render frame is no longer reusing the RenderView as its "
<< "RenderWidget!";
if (render_widget_ && render_view_.get() != render_widget_.get()) {
@@ -5013,12 +5011,12 @@ void RenderFrameImpl::BeginNavigation(blink::WebURLRequest* request) {
GetFetchCredentialsModeForWebURLRequest(*request));
DCHECK(GetFetchRedirectModeForWebURLRequest(*request) ==
FetchRedirectMode::MANUAL_MODE);
- DCHECK_IMPLIES(!frame_->parent(),
- GetRequestContextFrameTypeForWebURLRequest(*request) ==
- REQUEST_CONTEXT_FRAME_TYPE_TOP_LEVEL);
- DCHECK_IMPLIES(frame_->parent(),
- GetRequestContextFrameTypeForWebURLRequest(*request) ==
- REQUEST_CONTEXT_FRAME_TYPE_NESTED);
+ DCHECK(frame_->parent() ||
+ GetRequestContextFrameTypeForWebURLRequest(*request) ==
+ REQUEST_CONTEXT_FRAME_TYPE_TOP_LEVEL);
+ DCHECK(!frame_->parent() ||
+ GetRequestContextFrameTypeForWebURLRequest(*request) ==
+ REQUEST_CONTEXT_FRAME_TYPE_NESTED);
Send(new FrameHostMsg_BeginNavigation(
routing_id_,
« no previous file with comments | « content/renderer/input/input_handler_proxy.cc ('k') | content/test/test_render_frame_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698