| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2013 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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 return; | 387 return; |
| 388 | 388 |
| 389 releaseStore(&m_opened, 0); | 389 releaseStore(&m_opened, 0); |
| 390 m_sqliteDatabase.close(); | 390 m_sqliteDatabase.close(); |
| 391 // See comment at the top this file regarding calling removeOpenDatabase(). | 391 // See comment at the top this file regarding calling removeOpenDatabase(). |
| 392 DatabaseTracker::tracker().removeOpenDatabase(this); | 392 DatabaseTracker::tracker().removeOpenDatabase(this); |
| 393 { | 393 { |
| 394 MutexLocker locker(guidMutex()); | 394 MutexLocker locker(guidMutex()); |
| 395 | 395 |
| 396 ASSERT(guidCount().contains(m_guid)); | 396 ASSERT(guidCount().contains(m_guid)); |
| 397 if (guidCount().remove(m_guid)) { | 397 if (guidCount().erase(m_guid)) { |
| 398 guidToVersionMap().erase(m_guid); | 398 guidToVersionMap().erase(m_guid); |
| 399 } | 399 } |
| 400 } | 400 } |
| 401 } | 401 } |
| 402 | 402 |
| 403 String Database::version() const { | 403 String Database::version() const { |
| 404 // Note: In multi-process browsers the cached value may be accurate, but we | 404 // Note: In multi-process browsers the cached value may be accurate, but we |
| 405 // cannot read the actual version from the database without potentially | 405 // cannot read the actual version from the database without potentially |
| 406 // inducing a deadlock. | 406 // inducing a deadlock. |
| 407 // FIXME: Add an async version getter to the DatabaseAPI. | 407 // FIXME: Add an async version getter to the DatabaseAPI. |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 950 | 950 |
| 951 bool Database::opened() { | 951 bool Database::opened() { |
| 952 return static_cast<bool>(acquireLoad(&m_opened)); | 952 return static_cast<bool>(acquireLoad(&m_opened)); |
| 953 } | 953 } |
| 954 | 954 |
| 955 WebTaskRunner* Database::getDatabaseTaskRunner() const { | 955 WebTaskRunner* Database::getDatabaseTaskRunner() const { |
| 956 return m_databaseTaskRunner.get(); | 956 return m_databaseTaskRunner.get(); |
| 957 } | 957 } |
| 958 | 958 |
| 959 } // namespace blink | 959 } // namespace blink |
| OLD | NEW |