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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 1417903005: Revert of 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 7076e5e1c33004fab6e49fa77803222d788ff110..53978ffef39b4dc97a72ccd03d2fecdccee77d10 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -627,7 +627,7 @@
replicated_state.sandbox_flags);
}
render_frame->SetWebFrame(web_frame);
- CHECK(parent_routing_id != MSG_ROUTING_NONE || !web_frame->parent());
+ CHECK_IMPLIES(parent_routing_id == MSG_ROUTING_NONE, !web_frame->parent());
WebFrame* opener = ResolveOpener(opener_routing_id, nullptr);
web_frame->setOpener(opener);
@@ -1233,7 +1233,8 @@
SiteIsolationPolicy::IsSwappedOutStateForbidden();
// This codepath should only be hit for subframes when in --site-per-process.
- CHECK(is_main_frame_ || SiteIsolationPolicy::AreCrossProcessFramesPossible());
+ CHECK_IMPLIES(!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_) {
@@ -2653,7 +2654,7 @@
DocumentState* document_state = DocumentState::FromDataSource(ds);
// We should only navigate to swappedout:// when is_swapped_out_ is true.
- CHECK(ds->request().url() != GURL(kSwappedOutURL) || is_swapped_out_)
+ CHECK_IMPLIES(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.
@@ -2819,8 +2820,9 @@
// 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(!navigation_state->common_params().should_replace_current_entry ||
- render_view_->history_list_length_ > 0);
+ DCHECK_IMPLIES(
+ 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.
@@ -4983,12 +4985,12 @@
GetFetchCredentialsModeForWebURLRequest(*request));
DCHECK(GetFetchRedirectModeForWebURLRequest(*request) ==
FetchRedirectMode::MANUAL_MODE);
- DCHECK(frame_->parent() ||
- GetRequestContextFrameTypeForWebURLRequest(*request) ==
- REQUEST_CONTEXT_FRAME_TYPE_TOP_LEVEL);
- DCHECK(!frame_->parent() ||
- GetRequestContextFrameTypeForWebURLRequest(*request) ==
- REQUEST_CONTEXT_FRAME_TYPE_NESTED);
+ DCHECK_IMPLIES(!frame_->parent(),
+ GetRequestContextFrameTypeForWebURLRequest(*request) ==
+ REQUEST_CONTEXT_FRAME_TYPE_TOP_LEVEL);
+ DCHECK_IMPLIES(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