| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 if (!url.isValid()) { | 235 if (!url.isValid()) { |
| 236 ec = SYNTAX_ERR; | 236 ec = SYNTAX_ERR; |
| 237 return; | 237 return; |
| 238 } | 238 } |
| 239 completedURLs.append(url); | 239 completedURLs.append(url); |
| 240 } | 240 } |
| 241 Vector<KURL>::const_iterator end = completedURLs.end(); | 241 Vector<KURL>::const_iterator end = completedURLs.end(); |
| 242 | 242 |
| 243 for (Vector<KURL>::const_iterator it = completedURLs.begin(); it != end; ++i
t) { | 243 for (Vector<KURL>::const_iterator it = completedURLs.begin(); it != end; ++i
t) { |
| 244 RefPtr<WorkerScriptLoader> scriptLoader(WorkerScriptLoader::create()); | 244 RefPtr<WorkerScriptLoader> scriptLoader(WorkerScriptLoader::create()); |
| 245 #if PLATFORM(CHROMIUM) || PLATFORM(BLACKBERRY) | 245 #if PLATFORM(CHROMIUM) |
| 246 scriptLoader->setTargetType(ResourceRequest::TargetIsScript); | 246 scriptLoader->setTargetType(ResourceRequest::TargetIsScript); |
| 247 #endif | 247 #endif |
| 248 scriptLoader->loadSynchronously(scriptExecutionContext(), *it, AllowCros
sOriginRequests); | 248 scriptLoader->loadSynchronously(scriptExecutionContext(), *it, AllowCros
sOriginRequests); |
| 249 | 249 |
| 250 // If the fetching attempt failed, throw a NETWORK_ERR exception and abo
rt all these steps. | 250 // If the fetching attempt failed, throw a NETWORK_ERR exception and abo
rt all these steps. |
| 251 if (scriptLoader->failed()) { | 251 if (scriptLoader->failed()) { |
| 252 ec = XMLHttpRequestException::NETWORK_ERR; | 252 ec = XMLHttpRequestException::NETWORK_ERR; |
| 253 return; | 253 return; |
| 254 } | 254 } |
| 255 | 255 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 } | 372 } |
| 373 | 373 |
| 374 WorkerEventQueue* WorkerContext::eventQueue() const | 374 WorkerEventQueue* WorkerContext::eventQueue() const |
| 375 { | 375 { |
| 376 return m_eventQueue.get(); | 376 return m_eventQueue.get(); |
| 377 } | 377 } |
| 378 | 378 |
| 379 } // namespace WebCore | 379 } // namespace WebCore |
| 380 | 380 |
| 381 #endif // ENABLE(WORKERS) | 381 #endif // ENABLE(WORKERS) |
| OLD | NEW |