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

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp

Issue 1826733002: Remove ASSERT_WITH_MESSAGE family. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 IDBObjectStore* objectStore = it->value; 184 IDBObjectStore* objectStore = it->value;
185 m_objectStoreMap.remove(name); 185 m_objectStoreMap.remove(name);
186 objectStore->markDeleted(); 186 objectStore->markDeleted();
187 m_objectStoreCleanupMap.set(objectStore, objectStore->metadata()); 187 m_objectStoreCleanupMap.set(objectStore, objectStore->metadata());
188 m_deletedObjectStores.add(objectStore); 188 m_deletedObjectStores.add(objectStore);
189 } 189 }
190 } 190 }
191 191
192 void IDBTransaction::setActive(bool active) 192 void IDBTransaction::setActive(bool active)
193 { 193 {
194 ASSERT_WITH_MESSAGE(m_state != Finished, "A finished transaction tried to se tActive(%s)", active ? "true" : "false"); 194 DCHECK_NE(m_state, Finished) << "A finished transaction tried to setActive(" << (active ? "true" : "false") << ")";
195 if (m_state == Finishing) 195 if (m_state == Finishing)
196 return; 196 return;
197 ASSERT(active != (m_state == Active)); 197 ASSERT(active != (m_state == Active));
198 m_state = active ? Active : Inactive; 198 m_state = active ? Active : Inactive;
199 199
200 if (!active && m_requestList.isEmpty() && backendDB()) 200 if (!active && m_requestList.isEmpty() && backendDB())
201 backendDB()->commit(m_id); 201 backendDB()->commit(m_id);
202 } 202 }
203 203
204 void IDBTransaction::abort(ExceptionState& exceptionState) 204 void IDBTransaction::abort(ExceptionState& exceptionState)
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 if (m_contextStopped) 406 if (m_contextStopped)
407 return; 407 return;
408 408
409 m_contextStopped = true; 409 m_contextStopped = true;
410 410
411 abort(IGNORE_EXCEPTION); 411 abort(IGNORE_EXCEPTION);
412 } 412 }
413 413
414 void IDBTransaction::enqueueEvent(PassRefPtrWillBeRawPtr<Event> event) 414 void IDBTransaction::enqueueEvent(PassRefPtrWillBeRawPtr<Event> event)
415 { 415 {
416 ASSERT_WITH_MESSAGE(m_state != Finished, "A finished transaction tried to en queue an event of type %s.", event->type().utf8().data()); 416 DCHECK_NE(m_state, Finished) << "A finished transaction tried to enqueue an event of type " << event->type() << ".";
417 if (m_contextStopped || !getExecutionContext()) 417 if (m_contextStopped || !getExecutionContext())
418 return; 418 return;
419 419
420 EventQueue* eventQueue = getExecutionContext()->getEventQueue(); 420 EventQueue* eventQueue = getExecutionContext()->getEventQueue();
421 event->setTarget(this); 421 event->setTarget(this);
422 eventQueue->enqueueEvent(event); 422 eventQueue->enqueueEvent(event);
423 } 423 }
424 424
425 WebIDBDatabase* IDBTransaction::backendDB() const 425 WebIDBDatabase* IDBTransaction::backendDB() const
426 { 426 {
427 return m_database->backend(); 427 return m_database->backend();
428 } 428 }
429 429
430 } // namespace blink 430 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698