| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2010, 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 180 |
| 181 cleanUpAfterCallback(); | 181 cleanUpAfterCallback(); |
| 182 } | 182 } |
| 183 | 183 |
| 184 void WorkerFileSystemCallbacksBridge::cleanUpAfterCallback() | 184 void WorkerFileSystemCallbacksBridge::cleanUpAfterCallback() |
| 185 { | 185 { |
| 186 ASSERT(m_workerContext->isContextThread()); | 186 ASSERT(m_workerContext->isContextThread()); |
| 187 | 187 |
| 188 m_callbacksOnWorkerThread = 0; | 188 m_callbacksOnWorkerThread = 0; |
| 189 if (m_workerContextObserver) { | 189 if (m_workerContextObserver) { |
| 190 delete m_workerContextObserver; | 190 WorkerFileSystemContextObserver* observer = m_workerContextObserver; |
| 191 m_workerContextObserver = 0; | 191 m_workerContextObserver = 0; |
| 192 // The next line may delete this. |
| 193 delete observer; |
| 192 } | 194 } |
| 193 } | 195 } |
| 194 | 196 |
| 195 void WorkerFileSystemCallbacksBridge::postOpenFileSystemToMainThread(WebCommonWo
rkerClient* commonClient, WebFileSystem::Type type, long long size, bool create,
const String& mode) | 197 void WorkerFileSystemCallbacksBridge::postOpenFileSystemToMainThread(WebCommonWo
rkerClient* commonClient, WebFileSystem::Type type, long long size, bool create,
const String& mode) |
| 196 { | 198 { |
| 197 dispatchTaskToMainThread( | 199 dispatchTaskToMainThread( |
| 198 createCallbackTask(&openFileSystemOnMainThread, | 200 createCallbackTask(&openFileSystemOnMainThread, |
| 199 AllowCrossThreadAccess(commonClient), type, size, cre
ate, | 201 AllowCrossThreadAccess(commonClient), type, size, cre
ate, |
| 200 this, mode)); | 202 this, mode)); |
| 201 } | 203 } |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 ASSERT(isMainThread()); | 462 ASSERT(isMainThread()); |
| 461 | 463 |
| 462 MutexLocker locker(m_loaderProxyMutex); | 464 MutexLocker locker(m_loaderProxyMutex); |
| 463 if (m_workerLoaderProxy) | 465 if (m_workerLoaderProxy) |
| 464 m_workerLoaderProxy->postTaskForModeToWorkerContext(createCallbackTask(&
runTaskOnWorkerThread, this, task), mode); | 466 m_workerLoaderProxy->postTaskForModeToWorkerContext(createCallbackTask(&
runTaskOnWorkerThread, this, task), mode); |
| 465 } | 467 } |
| 466 | 468 |
| 467 } // namespace WebCore | 469 } // namespace WebCore |
| 468 | 470 |
| 469 #endif // ENABLE(FILE_SYSTEM) | 471 #endif // ENABLE(FILE_SYSTEM) |
| OLD | NEW |