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

Unified Diff: third_party/WebKit/Source/modules/csspaint/PaintWorkletTest.cpp

Issue 2862963003: Replace ASSERT with DCHECK in modules/ (Closed)
Patch Set: NOTREACHED instead of DCHECK(false) 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/modules/csspaint/PaintWorkletTest.cpp
diff --git a/third_party/WebKit/Source/modules/csspaint/PaintWorkletTest.cpp b/third_party/WebKit/Source/modules/csspaint/PaintWorkletTest.cpp
index fa235a8d0be44a78e26854bccbc68824cc3b71c2..7a9be6568820c1a897bc0e710a19a65cd1f8eeb1 100644
--- a/third_party/WebKit/Source/modules/csspaint/PaintWorkletTest.cpp
+++ b/third_party/WebKit/Source/modules/csspaint/PaintWorkletTest.cpp
@@ -38,11 +38,11 @@ TEST_F(PaintWorkletTest, GarbageCollectionOfCSSPaintDefinition) {
ScriptSourceCode("registerPaint('foo', class { paint() { } });"));
CSSPaintDefinition* definition = global_scope->FindDefinition("foo");
- ASSERT(definition);
+ DCHECK(definition);
v8::Isolate* isolate =
global_scope->ScriptController()->GetScriptState()->GetIsolate();
- ASSERT(isolate);
+ DCHECK(isolate);
// Set our ScopedPersistent to the paint function, and make weak.
ScopedPersistent<v8::Function> handle;
@@ -51,13 +51,13 @@ TEST_F(PaintWorkletTest, GarbageCollectionOfCSSPaintDefinition) {
handle.Set(isolate, definition->PaintFunctionForTesting(isolate));
handle.SetPhantom();
}
- ASSERT(!handle.IsEmpty());
- ASSERT(handle.IsWeak());
+ DCHECK(!handle.IsEmpty());
+ DCHECK(handle.IsWeak());
// Run a GC, persistent shouldn't have been collected yet.
ThreadState::Current()->CollectAllGarbage();
V8GCController::CollectAllGarbageForTesting(isolate);
- ASSERT(!handle.IsEmpty());
+ DCHECK(!handle.IsEmpty());
// Delete the page & associated objects.
page_.reset();
@@ -65,7 +65,7 @@ TEST_F(PaintWorkletTest, GarbageCollectionOfCSSPaintDefinition) {
// Run a GC, the persistent should have been collected.
ThreadState::Current()->CollectAllGarbage();
V8GCController::CollectAllGarbageForTesting(isolate);
- ASSERT(handle.IsEmpty());
+ DCHECK(handle.IsEmpty());
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698