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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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 | Annotate | Revision Log
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 CoordinationInfoMap::iterator coordinationInfoIterator = m_coordinationInfoM ap.find(dbIdentifier); 98 CoordinationInfoMap::iterator coordinationInfoIterator = m_coordinationInfoM ap.find(dbIdentifier);
99 ASSERT_WITH_SECURITY_IMPLICATION(coordinationInfoIterator != m_coordinationI nfoMap.end()); 99 ASSERT_WITH_SECURITY_IMPLICATION(coordinationInfoIterator != m_coordinationI nfoMap.end());
100 CoordinationInfo& info = coordinationInfoIterator->value; 100 CoordinationInfo& info = coordinationInfoIterator->value;
101 101
102 if (transaction->isReadOnly()) { 102 if (transaction->isReadOnly()) {
103 ASSERT(info.activeReadTransactions.contains(transaction)); 103 ASSERT(info.activeReadTransactions.contains(transaction));
104 info.activeReadTransactions.remove(transaction); 104 info.activeReadTransactions.remove(transaction);
105 } else { 105 } else {
106 ASSERT(info.activeWriteTransaction == transaction); 106 ASSERT(info.activeWriteTransaction == transaction);
107 info.activeWriteTransaction = 0; 107 info.activeWriteTransaction = nullptr;
108 } 108 }
109 109
110 processPendingTransactions(info); 110 processPendingTransactions(info);
111 } 111 }
112 112
113 void SQLTransactionCoordinator::shutdown() 113 void SQLTransactionCoordinator::shutdown()
114 { 114 {
115 // Prevent releaseLock() from accessing / changing the coordinationInfo 115 // Prevent releaseLock() from accessing / changing the coordinationInfo
116 // while we're shutting down. 116 // while we're shutting down.
117 m_isShuttingDown = true; 117 m_isShuttingDown = true;
(...skipping 22 matching lines...) Expand all
140 RefPtr<SQLTransactionBackend> transaction = info.pendingTransactions .first(); 140 RefPtr<SQLTransactionBackend> transaction = info.pendingTransactions .first();
141 transaction->notifyDatabaseThreadIsShuttingDown(); 141 transaction->notifyDatabaseThreadIsShuttingDown();
142 } 142 }
143 } 143 }
144 144
145 // Clean up all pending transactions for all databases 145 // Clean up all pending transactions for all databases
146 m_coordinationInfoMap.clear(); 146 m_coordinationInfoMap.clear();
147 } 147 }
148 148
149 } // namespace WebCore 149 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/webdatabase/SQLTransactionBackendSync.cpp ('k') | Source/modules/webmidi/MIDIConnectionEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698