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

Unified Diff: third_party/WebKit/Source/core/frame/FrameSerializer.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
« no previous file with comments | « third_party/WebKit/Source/core/frame/Frame.cpp ('k') | third_party/WebKit/Source/core/frame/FrameView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/FrameSerializer.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameSerializer.cpp b/third_party/WebKit/Source/core/frame/FrameSerializer.cpp
index f11ea6d0784b335d47b9197fa4b80848598352ac..a2258654313ad94f65350fda26b7e48f38c62b14 100644
--- a/third_party/WebKit/Source/core/frame/FrameSerializer.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameSerializer.cpp
@@ -206,7 +206,7 @@ void SerializerMarkupAccumulator::AppendAttribute(StringBuilder& out,
AppendRewrittenAttribute(out, element, attribute.GetName().ToString(),
new_link_for_the_element);
} else {
- ASSERT(is_src_doc_attribute);
+ DCHECK(is_src_doc_attribute);
// Emit src instead of srcdoc attribute for frame elements - we want the
// serialized subframe to use html contents from the link provided by
// Delegate::rewriteLink rather than html contents from srcdoc
@@ -271,7 +271,7 @@ FrameSerializer::FrameSerializer(Deque<SerializedResource>& resources,
void FrameSerializer::SerializeFrame(const LocalFrame& frame) {
TRACE_EVENT0("page-serialization", "FrameSerializer::serializeFrame");
- ASSERT(frame.GetDocument());
+ DCHECK(frame.GetDocument());
Document& document = *frame.GetDocument();
KURL url = document.Url();
@@ -300,7 +300,7 @@ void FrameSerializer::SerializeFrame(const LocalFrame& frame) {
}
for (Node* node : serialized_nodes) {
- ASSERT(node);
+ DCHECK(node);
if (!node->IsElementNode())
continue;
@@ -383,7 +383,7 @@ void FrameSerializer::SerializeCSSStyleSheet(CSSStyleSheet& style_sheet,
}
WTF::TextEncoding text_encoding(style_sheet.Contents()->Charset());
- ASSERT(text_encoding.IsValid());
+ DCHECK(text_encoding.IsValid());
String text_string = css_text.ToString();
CString text = text_encoding.Encode(
text_string, WTF::kCSSEncodedEntitiesForUnencodables);
@@ -410,7 +410,7 @@ void FrameSerializer::SerializeCSSStyleSheet(CSSStyleSheet& style_sheet,
}
void FrameSerializer::SerializeCSSRule(CSSRule* rule) {
- ASSERT(rule->parentStyleSheet()->OwnerDocument());
+ DCHECK(rule->parentStyleSheet()->OwnerDocument());
Document& document = *rule->parentStyleSheet()->OwnerDocument();
switch (rule->type()) {
@@ -422,7 +422,7 @@ void FrameSerializer::SerializeCSSRule(CSSRule* rule) {
case CSSRule::kImportRule: {
CSSImportRule* import_rule = ToCSSImportRule(rule);
KURL sheet_base_url = rule->parentStyleSheet()->BaseURL();
- ASSERT(sheet_base_url.IsValid());
+ DCHECK(sheet_base_url.IsValid());
KURL import_url = KURL(sheet_base_url, import_rule->href());
if (import_rule->styleSheet())
SerializeCSSStyleSheet(*import_rule->styleSheet(), import_url);
« no previous file with comments | « third_party/WebKit/Source/core/frame/Frame.cpp ('k') | third_party/WebKit/Source/core/frame/FrameView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698