OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 Apple 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 #endif | 99 #endif |
100 } | 100 } |
101 | 101 |
102 void DatabaseManager::unregisterDatabaseContext( | 102 void DatabaseManager::unregisterDatabaseContext( |
103 DatabaseContext* databaseContext) { | 103 DatabaseContext* databaseContext) { |
104 ExecutionContext* context = databaseContext->getExecutionContext(); | 104 ExecutionContext* context = databaseContext->getExecutionContext(); |
105 ASSERT(m_contextMap.get(context)); | 105 ASSERT(m_contextMap.get(context)); |
106 #if DCHECK_IS_ON() | 106 #if DCHECK_IS_ON() |
107 m_databaseContextRegisteredCount--; | 107 m_databaseContextRegisteredCount--; |
108 #endif | 108 #endif |
109 m_contextMap.remove(context); | 109 m_contextMap.erase(context); |
110 } | 110 } |
111 | 111 |
112 #if DCHECK_IS_ON() | 112 #if DCHECK_IS_ON() |
113 void DatabaseManager::didConstructDatabaseContext() { | 113 void DatabaseManager::didConstructDatabaseContext() { |
114 m_databaseContextInstanceCount++; | 114 m_databaseContextInstanceCount++; |
115 } | 115 } |
116 | 116 |
117 void DatabaseManager::didDestructDatabaseContext() { | 117 void DatabaseManager::didDestructDatabaseContext() { |
118 m_databaseContextInstanceCount--; | 118 m_databaseContextInstanceCount--; |
119 ASSERT(m_databaseContextRegisteredCount <= m_databaseContextInstanceCount); | 119 ASSERT(m_databaseContextRegisteredCount <= m_databaseContextInstanceCount); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 createIfDoesNotExist); | 224 createIfDoesNotExist); |
225 } | 225 } |
226 | 226 |
227 void DatabaseManager::logErrorMessage(ExecutionContext* context, | 227 void DatabaseManager::logErrorMessage(ExecutionContext* context, |
228 const String& message) { | 228 const String& message) { |
229 context->addConsoleMessage( | 229 context->addConsoleMessage( |
230 ConsoleMessage::create(StorageMessageSource, ErrorMessageLevel, message)); | 230 ConsoleMessage::create(StorageMessageSource, ErrorMessageLevel, message)); |
231 } | 231 } |
232 | 232 |
233 } // namespace blink | 233 } // namespace blink |
OLD | NEW |