| Index: third_party/WebKit/Source/modules/webdatabase/Database.cpp
|
| diff --git a/third_party/WebKit/Source/modules/webdatabase/Database.cpp b/third_party/WebKit/Source/modules/webdatabase/Database.cpp
|
| index 49172e398407040128481fd2e1554d7e8fd9f28a..7074cbd62480c5fa4b9571728eaf71b3486581fb 100644
|
| --- a/third_party/WebKit/Source/modules/webdatabase/Database.cpp
|
| +++ b/third_party/WebKit/Source/modules/webdatabase/Database.cpp
|
| @@ -53,6 +53,7 @@
|
| #include "platform/weborigin/DatabaseIdentifier.h"
|
| #include "public/platform/Platform.h"
|
| #include "public/platform/WebDatabaseObserver.h"
|
| +#include "wtf/Atomics.h"
|
|
|
| // Registering "opened" databases with the DatabaseTracker
|
| // =======================================================
|
| @@ -208,7 +209,7 @@ Database::Database(DatabaseContext* databaseContext, const String& name, const S
|
| , m_displayName(displayName.isolatedCopy())
|
| , m_estimatedSize(estimatedSize)
|
| , m_guid(0)
|
| - , m_opened(false)
|
| + , m_opened(0)
|
| , m_new(false)
|
| , m_transactionInProgress(false)
|
| , m_isTransactionQueueEnabled(true)
|
| @@ -369,8 +370,8 @@ void Database::closeDatabase()
|
| if (!m_opened)
|
| return;
|
|
|
| + releaseStore(&m_opened, 0);
|
| m_sqliteDatabase.close();
|
| - m_opened = false;
|
| // See comment at the top this file regarding calling removeOpenDatabase().
|
| DatabaseTracker::tracker().removeOpenDatabase(this);
|
| {
|
| @@ -530,7 +531,7 @@ bool Database::performOpenAndVerify(bool shouldSetVersionInNewDatabase, Database
|
|
|
| // See comment at the top this file regarding calling addOpenDatabase().
|
| DatabaseTracker::tracker().addOpenDatabase(this);
|
| - m_opened = true;
|
| + m_opened = 1;
|
|
|
| // Declare success:
|
| error = DatabaseError::None; // Clear the presumed error from above.
|
| @@ -901,4 +902,9 @@ SecurityOrigin* Database::securityOrigin() const
|
| return 0;
|
| }
|
|
|
| +bool Database::opened()
|
| +{
|
| + return static_cast<bool>(acquireLoad(&m_opened));
|
| +}
|
| +
|
| } // namespace blink
|
|
|