diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-02-13 16:23:34 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-02-14 10:37:21 +0000 |
commit | 38a9a29f4f9436cace7f0e7abf9c586057df8a4e (patch) | |
tree | c4e8c458dc595bc0ddb435708fa2229edfd00bd4 /chromium/third_party/blink/renderer/modules/webdatabase/database.cc | |
parent | e684a3455bcc29a6e3e66a004e352dea4e1141e7 (diff) | |
download | qtwebengine-chromium-38a9a29f4f9436cace7f0e7abf9c586057df8a4e.tar.gz |
BASELINE: Update Chromium to 73.0.3683.37
Change-Id: I08c9af2948b645f671e5d933aca1f7a90ea372f2
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/modules/webdatabase/database.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/modules/webdatabase/database.cc | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/chromium/third_party/blink/renderer/modules/webdatabase/database.cc b/chromium/third_party/blink/renderer/modules/webdatabase/database.cc index dc8fcd38ba6..999d4bc666a 100644 --- a/chromium/third_party/blink/renderer/modules/webdatabase/database.cc +++ b/chromium/third_party/blink/renderer/modules/webdatabase/database.cc @@ -53,7 +53,6 @@ #include "third_party/blink/renderer/platform/cross_thread_functional.h" #include "third_party/blink/renderer/platform/scheduler/public/post_cross_thread_task.h" #include "third_party/blink/renderer/platform/waitable_event.h" -#include "third_party/blink/renderer/platform/wtf/atomics.h" // Registering "opened" databases with the DatabaseTracker // ======================================================= @@ -225,7 +224,7 @@ Database::Database(DatabaseContext* database_context, display_name_(display_name.IsolatedCopy()), estimated_size_(estimated_size), guid_(0), - opened_(0), + opened_(false), new_(false), transaction_in_progress_(false), is_transaction_queue_enabled_(true) { @@ -266,7 +265,7 @@ Database::~Database() { // DatabaseContext::stopDatabases()). By the time we get here, the SQLite // database should have already been closed. - DCHECK(!opened_); + DCHECK(!Opened()); } void Database::Trace(blink::Visitor* visitor) { @@ -411,10 +410,10 @@ const char* Database::DatabaseInfoTableName() { } void Database::CloseDatabase() { - if (!opened_) + if (!opened_.load(std::memory_order_relaxed)) return; - ReleaseStore(&opened_, 0); + opened_.store(false, std::memory_order_release); sqlite_database_.Close(); // See comment at the top this file regarding calling removeOpenDatabase(). DatabaseTracker::Tracker().RemoveOpenDatabase(this); @@ -590,7 +589,7 @@ bool Database::PerformOpenAndVerify(bool should_set_version_in_new_database, // See comment at the top this file regarding calling addOpenDatabase(). DatabaseTracker::Tracker().AddOpenDatabase(this); - opened_ = 1; + opened_.store(true, std::memory_order_release); // Declare success: error = DatabaseError::kNone; // Clear the presumed error from above. @@ -924,10 +923,6 @@ const SecurityOrigin* Database::GetSecurityOrigin() const { return nullptr; } -bool Database::Opened() { - return static_cast<bool>(AcquireLoad(&opened_)); -} - base::SingleThreadTaskRunner* Database::GetDatabaseTaskRunner() const { return database_task_runner_.get(); } |