Keep track of pending value changes in StorageAreaProxy
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Mar 2013 00:59:59 +0000 (00:59 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Mar 2013 00:59:59 +0000 (00:59 +0000)
commit618ec596a3bdc14bb7ab611194e7b2cf27146a54
treeadf16b271ec1093b68513e66a0b2b1248fc8af70
parent933bedf25fa5168524eb1cd43803618947a1cec9
Keep track of pending value changes in StorageAreaProxy
https://bugs.webkit.org/show_bug.cgi?id=111496

Reviewed by Beth Dakin.

Add a HashCountedSet to keep track of the number of pending value
changes for a given key. If we get incoming storage events from other
processes while we have pending value changes, ignore the events.

* WebProcess/Storage/StorageAreaProxy.cpp:
(WebKit::StorageAreaProxy::setItem):
(WebKit::StorageAreaProxy::didSetItem):
(WebKit::StorageAreaProxy::dispatchStorageEvent):
(WebKit::StorageAreaProxy::shouldApplyChangesForKey):
(WebKit):
* WebProcess/Storage/StorageAreaProxy.h:
(StorageAreaProxy):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144850 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Storage/StorageAreaProxy.cpp
Source/WebKit2/WebProcess/Storage/StorageAreaProxy.h