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

Side by Side Diff: third_party/WebKit/Source/modules/webdatabase/SQLTransactionCoordinator.cpp

Issue 2458003002: Remove ASSERT_WITH_SECURITY_IMPLICATION. (Closed)
Patch Set: Minor formatting fix Created 4 years, 1 month 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 void SQLTransactionCoordinator::releaseLock( 93 void SQLTransactionCoordinator::releaseLock(
94 SQLTransactionBackend* transaction) { 94 SQLTransactionBackend* transaction) {
95 if (m_isShuttingDown) 95 if (m_isShuttingDown)
96 return; 96 return;
97 97
98 String dbIdentifier = getDatabaseIdentifier(transaction); 98 String dbIdentifier = getDatabaseIdentifier(transaction);
99 99
100 CoordinationInfoHeapMap::iterator coordinationInfoIterator = 100 CoordinationInfoHeapMap::iterator coordinationInfoIterator =
101 m_coordinationInfoMap.find(dbIdentifier); 101 m_coordinationInfoMap.find(dbIdentifier);
102 ASSERT_WITH_SECURITY_IMPLICATION(coordinationInfoIterator != 102 SECURITY_DCHECK(coordinationInfoIterator != m_coordinationInfoMap.end());
103 m_coordinationInfoMap.end());
104 CoordinationInfo& info = coordinationInfoIterator->value; 103 CoordinationInfo& info = coordinationInfoIterator->value;
105 104
106 if (transaction->isReadOnly()) { 105 if (transaction->isReadOnly()) {
107 ASSERT(info.activeReadTransactions.contains(transaction)); 106 ASSERT(info.activeReadTransactions.contains(transaction));
108 info.activeReadTransactions.remove(transaction); 107 info.activeReadTransactions.remove(transaction);
109 } else { 108 } else {
110 ASSERT(info.activeWriteTransaction == transaction); 109 ASSERT(info.activeWriteTransaction == transaction);
111 info.activeWriteTransaction = nullptr; 110 info.activeWriteTransaction = nullptr;
112 } 111 }
113 112
(...skipping 29 matching lines...) Expand all
143 SQLTransactionBackend* transaction = info.pendingTransactions.takeFirst(); 142 SQLTransactionBackend* transaction = info.pendingTransactions.takeFirst();
144 transaction->notifyDatabaseThreadIsShuttingDown(); 143 transaction->notifyDatabaseThreadIsShuttingDown();
145 } 144 }
146 } 145 }
147 146
148 // Clean up all pending transactions for all databases 147 // Clean up all pending transactions for all databases
149 m_coordinationInfoMap.clear(); 148 m_coordinationInfoMap.clear();
150 } 149 }
151 150
152 } // namespace blink 151 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698