summaryrefslogtreecommitdiff
path: root/Source/WebCore/Modules/quota/StorageErrorCallback.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/Modules/quota/StorageErrorCallback.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/Modules/quota/StorageErrorCallback.cpp')
-rw-r--r--Source/WebCore/Modules/quota/StorageErrorCallback.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/Source/WebCore/Modules/quota/StorageErrorCallback.cpp b/Source/WebCore/Modules/quota/StorageErrorCallback.cpp
index 983a542b7..6baf4bcbd 100644
--- a/Source/WebCore/Modules/quota/StorageErrorCallback.cpp
+++ b/Source/WebCore/Modules/quota/StorageErrorCallback.cpp
@@ -39,20 +39,14 @@
namespace WebCore {
-StorageErrorCallback::CallbackTask::CallbackTask(PassRefPtr<StorageErrorCallback> callback, ExceptionCode ec)
- : m_callback(callback)
- , m_ec(ec)
+StorageErrorCallback::CallbackTask::CallbackTask(RefPtr<StorageErrorCallback>&& callback, ExceptionCode ec)
+ : ScriptExecutionContext::Task([callback, ec] (ScriptExecutionContext*) {
+ if (callback)
+ callback->handleEvent(DOMCoreException::create(ExceptionCodeDescription(ec)).get());
+ })
{
}
-void StorageErrorCallback::CallbackTask::performTask(ScriptExecutionContext*)
-{
- if (!m_callback)
- return;
- ExceptionCodeDescription description(m_ec);
- m_callback->handleEvent(DOMCoreException::create(description).get());
-}
-
} // namespace WebCore
#endif // ENABLE(QUOTA)