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

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

Issue 2394683005: Remove ASSERT_UNUSED (Closed)
Patch Set: Created 4 years, 2 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 DCHECK(!m_requestAborted); 136 DCHECK(!m_requestAborted);
137 if (m_contextStopped || !getExecutionContext()) 137 if (m_contextStopped || !getExecutionContext())
138 return; 138 return;
139 DCHECK(m_readyState == PENDING || m_readyState == DONE); 139 DCHECK(m_readyState == PENDING || m_readyState == DONE);
140 if (m_readyState == DONE) 140 if (m_readyState == DONE)
141 return; 141 return;
142 142
143 EventQueue* eventQueue = getExecutionContext()->getEventQueue(); 143 EventQueue* eventQueue = getExecutionContext()->getEventQueue();
144 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { 144 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) {
145 bool removed = eventQueue->cancelEvent(m_enqueuedEvents[i].get()); 145 bool removed = eventQueue->cancelEvent(m_enqueuedEvents[i].get());
146 ASSERT_UNUSED(removed, removed); 146 DCHECK(removed);
147 } 147 }
148 m_enqueuedEvents.clear(); 148 m_enqueuedEvents.clear();
149 149
150 m_error.clear(); 150 m_error.clear();
151 m_result.clear(); 151 m_result.clear();
152 onError(DOMException::create( 152 onError(DOMException::create(
153 AbortError, 153 AbortError,
154 "The transaction was aborted, so the request cannot be fulfilled.")); 154 "The transaction was aborted, so the request cannot be fulfilled."));
155 m_requestAborted = true; 155 m_requestAborted = true;
156 } 156 }
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 } 542 }
543 543
544 void IDBRequest::dequeueEvent(Event* event) { 544 void IDBRequest::dequeueEvent(Event* event) {
545 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { 545 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) {
546 if (m_enqueuedEvents[i].get() == event) 546 if (m_enqueuedEvents[i].get() == event)
547 m_enqueuedEvents.remove(i); 547 m_enqueuedEvents.remove(i);
548 } 548 }
549 } 549 }
550 550
551 } // namespace blink 551 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698