Title: [161846] trunk/Source/WebCore
- Revision
- 161846
- Author
- [email protected]
- Date
- 2014-01-12 17:44:13 -0800 (Sun, 12 Jan 2014)
Log Message
Use an std::atomic<uint32_t> when computing IDBDatabase transaction IDs
https://bugs.webkit.org/show_bug.cgi?id=126853
Reviewed by Sam Weinig.
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::nextTransactionId):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (161845 => 161846)
--- trunk/Source/WebCore/ChangeLog 2014-01-13 01:38:07 UTC (rev 161845)
+++ trunk/Source/WebCore/ChangeLog 2014-01-13 01:44:13 UTC (rev 161846)
@@ -1,3 +1,13 @@
+2014-01-12 Anders Carlsson <[email protected]>
+
+ Use an std::atomic<uint32_t> when computing IDBDatabase transaction IDs
+ https://bugs.webkit.org/show_bug.cgi?id=126853
+
+ Reviewed by Sam Weinig.
+
+ * Modules/indexeddb/IDBDatabase.cpp:
+ (WebCore::IDBDatabase::nextTransactionId):
+
2014-01-12 Sam Weinig <[email protected]>
TextBreakIterator's should support Latin-1 for all iterator types (Part 1)
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp (161845 => 161846)
--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp 2014-01-13 01:38:07 UTC (rev 161845)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp 2014-01-13 01:44:13 UTC (rev 161846)
@@ -46,6 +46,7 @@
#include "Logging.h"
#include "ScriptCallStack.h"
#include "ScriptExecutionContext.h"
+#include <atomic>
#include <limits>
#include <wtf/Atomics.h>
@@ -78,8 +79,9 @@
{
// Only keep a 32-bit counter to allow ports to use the other 32
// bits of the id.
- AtomicallyInitializedStatic(int, currentTransactionId = 0);
- return atomicIncrement(¤tTransactionId);
+ static std::atomic<uint32_t> currentTransactionId;
+
+ return ++currentTransactionId;
}
void IDBDatabase::transactionCreated(IDBTransaction* transaction)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes