| Index: third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp
|
| diff --git a/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp b/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp
|
| index 34c58f2c8e3597a53bcd0087ce3f69c5cf225edf..d4c1a0434f7f7dd0471d7be5127a6547f45dbbbe 100644
|
| --- a/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp
|
| +++ b/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp
|
| @@ -86,10 +86,12 @@ template <typename CB, typename CBArg>
|
| void FileSystemCallbacksBase::handleEventOrScheduleCallback(CB* callback, CBArg* arg)
|
| {
|
| ASSERT(callback);
|
| - if (shouldScheduleCallback())
|
| - DOMFileSystem::scheduleCallback(m_executionContext.get(), callback, arg);
|
| - else if (callback)
|
| - callback->handleEvent(arg);
|
| + if (callback) {
|
| + if (shouldScheduleCallback())
|
| + DOMFileSystem::scheduleCallback(m_executionContext.get(), createSameThreadTask(&CB::handleEvent, wrapPersistent(callback), wrapPersistent(arg)));
|
| + else
|
| + callback->handleEvent(arg);
|
| + }
|
| m_executionContext.clear();
|
| }
|
|
|
| @@ -97,10 +99,12 @@ template <typename CB>
|
| void FileSystemCallbacksBase::handleEventOrScheduleCallback(CB* callback)
|
| {
|
| ASSERT(callback);
|
| - if (shouldScheduleCallback())
|
| - DOMFileSystem::scheduleCallback(m_executionContext.get(), callback);
|
| - else if (callback)
|
| - callback->handleEvent();
|
| + if (callback) {
|
| + if (shouldScheduleCallback())
|
| + DOMFileSystem::scheduleCallback(m_executionContext.get(), createSameThreadTask(&CB::handleEvent, wrapPersistent(callback)));
|
| + else
|
| + callback->handleEvent();
|
| + }
|
| m_executionContext.clear();
|
| }
|
|
|
|
|