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

Unified Diff: third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp

Issue 2891843004: Replace remaining ASSERT with DCHECK|DCHECK_FOO in core/frame (Closed)
Patch Set: Replace remaining ASSERT with DCHECK|DCHECK_FOO in core/frame 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
diff --git a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
index 85aa6a8da9cffb913e81560bf720981d6c173b6e..c0b08ff60fb9a48675ca345b1ee8d4f3f15516e5 100644
--- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
@@ -347,7 +347,7 @@ void ContentSecurityPolicy::AddPolicyFromHeaderValue(
policies_.push_back(policy.Release());
// Skip the comma, and begin the next header from the current position.
- ASSERT(position == end || *position == ',');
+ DCHECK(position == end || *position == ',');
skipExactly<UChar>(position, end, ',');
begin = position;
}
@@ -1174,7 +1174,7 @@ void ContentSecurityPolicy::ReportViolation(
RedirectStatus redirect_status,
Element* element,
const String& source) {
- ASSERT(violation_type == kURLViolation || blocked_url.IsEmpty());
+ DCHECK(violation_type == kURLViolation || blocked_url.IsEmpty());
// TODO(lukasza): Support sending reports from OOPIFs -
// https://crbug.com/611232 (or move CSP child-src and frame-src checks to the
@@ -1473,7 +1473,7 @@ void ContentSecurityPolicy::ReportInvalidPathCharacter(
const String& directive_name,
const String& value,
const char invalid_char) {
- ASSERT(invalid_char == '#' || invalid_char == '?');
+ DCHECK(invalid_char == '#' || invalid_char == '?');
String ignoring =
"The fragment identifier, including the '#', will be ignored.";

Powered by Google App Engine
This is Rietveld 408576698