| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 } | 149 } |
| 150 | 150 |
| 151 void WorkerThreadableLoader::MainThreadBridge::mainThreadCancel(ExecutionContext
* context, MainThreadBridge* thisPtr) | 151 void WorkerThreadableLoader::MainThreadBridge::mainThreadCancel(ExecutionContext
* context, MainThreadBridge* thisPtr) |
| 152 { | 152 { |
| 153 ASSERT(isMainThread()); | 153 ASSERT(isMainThread()); |
| 154 ASSERT_UNUSED(context, context->isDocument()); | 154 ASSERT_UNUSED(context, context->isDocument()); |
| 155 | 155 |
| 156 if (!thisPtr->m_mainThreadLoader) | 156 if (!thisPtr->m_mainThreadLoader) |
| 157 return; | 157 return; |
| 158 thisPtr->m_mainThreadLoader->cancel(); | 158 thisPtr->m_mainThreadLoader->cancel(); |
| 159 thisPtr->m_mainThreadLoader = 0; | 159 thisPtr->m_mainThreadLoader = nullptr; |
| 160 } | 160 } |
| 161 | 161 |
| 162 void WorkerThreadableLoader::MainThreadBridge::cancel() | 162 void WorkerThreadableLoader::MainThreadBridge::cancel() |
| 163 { | 163 { |
| 164 m_loaderProxy.postTaskToLoader( | 164 m_loaderProxy.postTaskToLoader( |
| 165 createCallbackTask(&MainThreadBridge::mainThreadCancel, AllowCrossThread
Access(this))); | 165 createCallbackTask(&MainThreadBridge::mainThreadCancel, AllowCrossThread
Access(this))); |
| 166 ThreadableLoaderClientWrapper* clientWrapper = m_workerClientWrapper.get(); | 166 ThreadableLoaderClientWrapper* clientWrapper = m_workerClientWrapper.get(); |
| 167 if (!clientWrapper->done()) { | 167 if (!clientWrapper->done()) { |
| 168 // If the client hasn't reached a termination state, then transition it
by sending a cancellation error. | 168 // If the client hasn't reached a termination state, then transition it
by sending a cancellation error. |
| 169 // Note: no more client callbacks will be done after this method -- the
clearClientWrapper() call ensures that. | 169 // Note: no more client callbacks will be done after this method -- the
clearClientWrapper() call ensures that. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 { | 218 { |
| 219 m_clientBridge->didFailAccessControlCheck(error); | 219 m_clientBridge->didFailAccessControlCheck(error); |
| 220 } | 220 } |
| 221 | 221 |
| 222 void WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck() | 222 void WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck() |
| 223 { | 223 { |
| 224 m_clientBridge->didFailRedirectCheck(); | 224 m_clientBridge->didFailRedirectCheck(); |
| 225 } | 225 } |
| 226 | 226 |
| 227 } // namespace WebCore | 227 } // namespace WebCore |
| OLD | NEW |