Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Dispatch storage manager messages to the storage work queue
https://bugs.webkit.org/show_bug.cgi?id=109099

Reviewed by Andreas Kling.

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::didReceiveMessageOnConnectionWorkQueue):
(WebKit::StorageManager::dispatchMessageOnStorageManagerQueue):
(WebKit):
* UIProcess/Storage/StorageManager.h:
(StorageManager):

Canonical link: https://commits.webkit.org/127292@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Anders Carlsson committed Feb 6, 2013
1 parent 69d2eb0 commit cd53823
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
14 changes: 14 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,17 @@
2013-02-06 Anders Carlsson <andersca@apple.com>

Dispatch storage manager messages to the storage work queue
https://bugs.webkit.org/show_bug.cgi?id=109099

Reviewed by Andreas Kling.

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::didReceiveMessageOnConnectionWorkQueue):
(WebKit::StorageManager::dispatchMessageOnStorageManagerQueue):
(WebKit):
* UIProcess/Storage/StorageManager.h:
(StorageManager):

2013-02-06 Anders Carlsson <andersca@apple.com>

Pass the document source URL to the pluginLoadPolicy callback
Expand Down
13 changes: 12 additions & 1 deletion Source/WebKit2/UIProcess/Storage/StorageManager.cpp
Expand Up @@ -59,7 +59,8 @@ void StorageManager::processWillCloseConnection(WebProcessProxy* webProcessProxy
void StorageManager::didReceiveMessageOnConnectionWorkQueue(CoreIPC::Connection* connection, OwnPtr<CoreIPC::MessageDecoder>& decoder)
{
if (decoder->messageReceiverName() == Messages::StorageManager::messageReceiverName()) {
didReceiveStorageManagerMessageOnConnectionWorkQueue(connection, decoder);
// FIXME: We should come up with a better way to automatically dispatch messages on a given work queue.
m_queue->dispatch(bind(&StorageManager::dispatchMessageOnStorageManagerQueue, this, RefPtr<CoreIPC::Connection>(connection), decoder.leakPtr()));
return;
}
}
Expand All @@ -78,4 +79,14 @@ void StorageManager::destroyStorageArea(CoreIPC::Connection*, uint64_t)
{
}

void StorageManager::dispatchMessageOnStorageManagerQueue(CoreIPC::Connection* connection, CoreIPC::MessageDecoder* decoder)
{
ASSERT(decoder->messageReceiverName() == Messages::StorageManager::messageReceiverName());

OwnPtr<CoreIPC::MessageDecoder> decoderPtr = adoptPtr(decoder);
didReceiveStorageManagerMessageOnConnectionWorkQueue(connection, decoderPtr);

ASSERT(!decoderPtr);
}

} // namespace WebKit
2 changes: 2 additions & 0 deletions Source/WebKit2/UIProcess/Storage/StorageManager.h
Expand Up @@ -58,6 +58,8 @@ class StorageManager : public ThreadSafeRefCounted<StorageManager>, private Core
void createStorageArea(CoreIPC::Connection*, uint64_t storageAreaID, uint64_t storageNamespaceID, const SecurityOriginData&);
void destroyStorageArea(CoreIPC::Connection*, uint64_t storageAreaID);

void dispatchMessageOnStorageManagerQueue(CoreIPC::Connection*, CoreIPC::MessageDecoder*);

RefPtr<WorkQueue> m_queue;
};

Expand Down

0 comments on commit cd53823

Please sign in to comment.