| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 { | 164 { |
| 165 notifyError(); | 165 notifyError(); |
| 166 } | 166 } |
| 167 | 167 |
| 168 void WorkerScriptLoader::notifyError() | 168 void WorkerScriptLoader::notifyError() |
| 169 { | 169 { |
| 170 m_failed = true; | 170 m_failed = true; |
| 171 notifyFinished(); | 171 notifyFinished(); |
| 172 } | 172 } |
| 173 | 173 |
| 174 void WorkerScriptLoader::cancel() |
| 175 { |
| 176 if (m_threadableLoader) |
| 177 m_threadableLoader->cancel(); |
| 178 } |
| 179 |
| 174 String WorkerScriptLoader::script() | 180 String WorkerScriptLoader::script() |
| 175 { | 181 { |
| 176 return m_script.toString(); | 182 return m_script.toString(); |
| 177 } | 183 } |
| 178 | 184 |
| 179 void WorkerScriptLoader::notifyFinished() | 185 void WorkerScriptLoader::notifyFinished() |
| 180 { | 186 { |
| 181 if (!m_client || m_finishing) | 187 if (!m_client || m_finishing) |
| 182 return; | 188 return; |
| 183 | 189 |
| 184 m_finishing = true; | 190 m_finishing = true; |
| 185 m_client->notifyFinished(); | 191 m_client->notifyFinished(); |
| 186 } | 192 } |
| 187 | 193 |
| 188 } // namespace WebCore | 194 } // namespace WebCore |
| OLD | NEW |