OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 { | 55 { |
56 MutexLocker locker(m_loaderProxyMutex); | 56 MutexLocker locker(m_loaderProxyMutex); |
57 m_proxy = 0; | 57 m_proxy = 0; |
58 } | 58 } |
59 } | 59 } |
60 | 60 |
61 void WorkerFileWriterCallbacksBridge::postWriteToMainThread(long long position,
const KURL& data) | 61 void WorkerFileWriterCallbacksBridge::postWriteToMainThread(long long position,
const KURL& data) |
62 { | 62 { |
63 ASSERT(!m_operationInProgress); | 63 ASSERT(!m_operationInProgress); |
64 m_operationInProgress = true; | 64 m_operationInProgress = true; |
65 dispatchTaskToMainThread(createCallbackTask(&writeOnMainThread, | 65 dispatchTaskToMainThread(createCallbackTask(&writeOnMainThread, |
66 this, position, data)); | 66 this, position, data)); |
67 } | 67 } |
68 | 68 |
69 void WorkerFileWriterCallbacksBridge::postTruncateToMainThread(long long length) | 69 void WorkerFileWriterCallbacksBridge::postTruncateToMainThread(long long length) |
70 { | 70 { |
71 ASSERT(!m_operationInProgress); | 71 ASSERT(!m_operationInProgress); |
72 m_operationInProgress = true; | 72 m_operationInProgress = true; |
73 dispatchTaskToMainThread(createCallbackTask(&truncateOnMainThread, | 73 dispatchTaskToMainThread(createCallbackTask(&truncateOnMainThread, |
74 this, length)); | 74 this, length)); |
75 } | 75 } |
76 | 76 |
77 void WorkerFileWriterCallbacksBridge::postAbortToMainThread() | 77 void WorkerFileWriterCallbacksBridge::postAbortToMainThread() |
78 { | 78 { |
79 ASSERT(m_operationInProgress); | 79 ASSERT(m_operationInProgress); |
80 dispatchTaskToMainThread(createCallbackTask(&abortOnMainThread, this)); | 80 dispatchTaskToMainThread(createCallbackTask(&abortOnMainThread, this)); |
81 } | 81 } |
82 | 82 |
83 void WorkerFileWriterCallbacksBridge::postShutdownToMainThread(PassRefPtr<Worker
FileWriterCallbacksBridge> bridge) | 83 void WorkerFileWriterCallbacksBridge::postShutdownToMainThread(PassRefPtr<Worker
FileWriterCallbacksBridge> bridge) |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 { | 219 { |
220 while (m_operationInProgress) { | 220 while (m_operationInProgress) { |
221 WorkerGlobalScope* context = toWorkerGlobalScope(m_workerGlobalScope); | 221 WorkerGlobalScope* context = toWorkerGlobalScope(m_workerGlobalScope); |
222 if (context->thread()->runLoop().runInMode(context, m_mode) == MessageQu
eueTerminated) | 222 if (context->thread()->runLoop().runInMode(context, m_mode) == MessageQu
eueTerminated) |
223 return false; | 223 return false; |
224 } | 224 } |
225 return true; | 225 return true; |
226 } | 226 } |
227 | 227 |
228 } // namespace WebKit | 228 } // namespace WebKit |
OLD | NEW |