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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp

Issue 2919653004: Use LOG() or LOG_IF() instead of IMMEDIATE_CRASH (Closed)
Patch Set: Use LOG() or CHECK()|CHECK_FOO() instead of IMMEDIATE_CRASH Created 3 years, 6 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/platform/graphics/GraphicsLayer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
index 1f1931d8df4f240a5b98c7b96955be0ab89e6a7f..521ba090cdb9cc9c4eaf02fbe6941b2e3f591e7c 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
@@ -387,15 +387,13 @@ static HashSet<int>* g_registered_layer_set;
void GraphicsLayer::RegisterContentsLayer(WebLayer* layer) {
if (!g_registered_layer_set)
g_registered_layer_set = new HashSet<int>;
- if (g_registered_layer_set->Contains(layer->Id()))
- IMMEDIATE_CRASH();
+ CHECK(!g_registered_layer_set->Contains(layer->Id()));
g_registered_layer_set->insert(layer->Id());
}
void GraphicsLayer::UnregisterContentsLayer(WebLayer* layer) {
DCHECK(g_registered_layer_set);
- if (!g_registered_layer_set->Contains(layer->Id()))
- IMMEDIATE_CRASH();
+ CHECK(g_registered_layer_set->Contains(layer->Id()));
g_registered_layer_set->erase(layer->Id());
}
@@ -403,8 +401,7 @@ void GraphicsLayer::SetContentsTo(WebLayer* layer) {
bool children_changed = false;
if (layer) {
DCHECK(g_registered_layer_set);
- if (!g_registered_layer_set->Contains(layer->Id()))
- IMMEDIATE_CRASH();
+ CHECK(g_registered_layer_set->Contains(layer->Id()));
if (contents_layer_id_ != layer->Id()) {
SetupContentsLayer(layer);
children_changed = true;
« no previous file with comments | « third_party/WebKit/Source/core/xml/XSLTProcessorLibxslt.cpp ('k') | third_party/WebKit/Source/platform/mac/BlockExceptions.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698