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

Unified Diff: third_party/WebKit/Source/core/clipboard/DataObject.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/clipboard/DataObject.cpp
diff --git a/third_party/WebKit/Source/core/clipboard/DataObject.cpp b/third_party/WebKit/Source/core/clipboard/DataObject.cpp
index 68e324ad11409fac84303aac3ba1eec52f9e8a43..e21fadfdadf89efad825ecd15c9a9f71492b0ff4 100644
--- a/third_party/WebKit/Source/core/clipboard/DataObject.cpp
+++ b/third_party/WebKit/Source/core/clipboard/DataObject.cpp
@@ -57,7 +57,9 @@ DataObject* DataObject::CreateFromPasteboard(PasteMode paste_mode) {
continue;
data_object->item_list_.push_back(
DataObjectItem::CreateFromPasteboard(type, sequence_number));
- ASSERT(types_seen.insert(type).is_new_entry);
+#if DCHECK_IS_ON()
+ DCHECK(types_seen.insert(type).is_new_entry);
+#endif
}
return data_object;
}
@@ -142,7 +144,9 @@ Vector<String> DataObject::Types() const {
case DataObjectItem::kStringKind:
// Per the spec, type must be unique among all items of kind 'string'.
results.push_back(item->GetType());
- ASSERT(types_seen.insert(item->GetType()).is_new_entry);
+#if DCHECK_IS_ON()
+ DCHECK(types_seen.insert(item->GetType()).is_new_entry);
+#endif
break;
case DataObjectItem::kFileKind:
contains_files = true;
@@ -151,7 +155,9 @@ Vector<String> DataObject::Types() const {
}
if (contains_files) {
results.push_back(kMimeTypeFiles);
- ASSERT(types_seen.insert(kMimeTypeFiles).is_new_entry);
+#if DCHECK_IS_ON()
+ DCHECK(types_seen.insert(kMimeTypeFiles).is_new_entry);
+#endif
}
return results;
}
« no previous file with comments | « third_party/WebKit/Source/core/clipboard/DataObject.h ('k') | third_party/WebKit/Source/core/clipboard/DataObjectItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698