[webkit-reviews] review granted: [Bug 73389] move data in IDBPendingTransactionMonitor from static to ThreadLocal : [Attachment 117107] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 29 20:47:16 PST 2011


David Levin <levin at chromium.org> has granted David Grogan
<dgrogan at chromium.org>'s request for review:
Bug 73389: move data in IDBPendingTransactionMonitor from static to ThreadLocal
https://bugs.webkit.org/show_bug.cgi?id=73389

Attachment 117107: Patch
https://bugs.webkit.org/attachment.cgi?id=117107&action=review

------- Additional Comments from David Levin <levin at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=117107&action=review


Feel free to address the items I mentioned and land it.

> Source/WebCore/storage/IDBPendingTransactionMonitor.cpp:38
> +   
AtomicallyInitializedStatic(ThreadSpecific<Vector<IDBTransactionBackendInterfac
e*> >*, transactions = new
ThreadSpecific<Vector<IDBTransactionBackendInterface*> >);

Note AtomicallyInitializedStatic takes a lock every time it is hit (every time
you all transactions()).

> Source/WebCore/storage/IDBPendingTransactionMonitor.cpp:49
> +    size_t pos = transactions()->find(transaction);

You should consider storing transactions() in a local variable to avoid hit the
mutex so often (especially in the loop below, etc).

> Source/WebCore/storage/IDBPendingTransactionMonitor.cpp:59
> +	   transactions()->at(i)->abort();

Shouldn't this also remove all of the items in addition to aborting them
(transactions().clear())?


More information about the webkit-reviews mailing list