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

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

Issue 2858963002: Replace ASSERT with DCHECK in core/ (Closed)
Patch Set: WorkerBackingThread 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/CSPDirectiveList.cpp
diff --git a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp
index f18545dc8c5c6af06875746790d5d65c44e5ae20..50570f2c24d3cd287ae4f07adde2f26502f2daaf 100644
--- a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp
@@ -931,7 +931,7 @@ bool CSPDirectiveList::AllowDynamicWorker() const {
}
const String& CSPDirectiveList::PluginTypesText() const {
- ASSERT(HasPluginTypes());
+ DCHECK(HasPluginTypes());
return plugin_types_->GetText();
}
@@ -958,7 +958,7 @@ void CSPDirectiveList::Parse(const UChar* begin, const UChar* end) {
String name, value;
if (ParseDirective(directive_begin, position, name, value)) {
- ASSERT(!name.IsEmpty());
+ DCHECK(!name.IsEmpty());
AddDirective(name, value);
}
@@ -975,8 +975,8 @@ bool CSPDirectiveList::ParseDirective(const UChar* begin,
const UChar* end,
String& name,
String& value) {
- ASSERT(name.IsEmpty());
- ASSERT(value.IsEmpty());
+ DCHECK(name.IsEmpty());
+ DCHECK(value.IsEmpty());
const UChar* position = begin;
skipWhile<UChar, IsASCIISpace>(position, end);
@@ -1209,7 +1209,7 @@ void CSPDirectiveList::EnableInsecureRequestsUpgrade(const String& name,
}
void CSPDirectiveList::AddDirective(const String& name, const String& value) {
- ASSERT(!name.IsEmpty());
+ DCHECK(!name.IsEmpty());
ContentSecurityPolicy::DirectiveType type =
ContentSecurityPolicy::GetDirectiveType(name);

Powered by Google App Engine
This is Rietveld 408576698