| 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 scriptLoader->loadSynchronously(scriptExecutionContext(), *it, AllowCros
sOriginRequests); | 207 scriptLoader->loadSynchronously(scriptExecutionContext(), *it, AllowCros
sOriginRequests); |
| 208 | 208 |
| 209 // If the fetching attempt failed, throw a NetworkError exception and ab
ort all these steps. | 209 // If the fetching attempt failed, throw a NetworkError exception and ab
ort all these steps. |
| 210 if (scriptLoader->failed()) { | 210 if (scriptLoader->failed()) { |
| 211 es.throwDOMException(NetworkError); | 211 es.throwDOMException(NetworkError); |
| 212 return; | 212 return; |
| 213 } | 213 } |
| 214 | 214 |
| 215 InspectorInstrumentation::scriptImported(scriptExecutionContext(), scrip
tLoader->identifier(), scriptLoader->script()); | 215 InspectorInstrumentation::scriptImported(scriptExecutionContext(), scrip
tLoader->identifier(), scriptLoader->script()); |
| 216 | 216 |
| 217 ScriptValue exception; | 217 RefPtr<ErrorEvent> errorEvent; |
| 218 m_script->evaluate(ScriptSourceCode(scriptLoader->script(), scriptLoader
->responseURL()), &exception); | 218 m_script->evaluate(ScriptSourceCode(scriptLoader->script(), scriptLoader
->responseURL()), &errorEvent); |
| 219 if (!exception.hasNoValue()) { | 219 if (errorEvent) { |
| 220 m_script->setException(exception); | 220 m_script->rethrowExceptionFromImportedScript(errorEvent.release()); |
| 221 return; | 221 return; |
| 222 } | 222 } |
| 223 } | 223 } |
| 224 } | 224 } |
| 225 | 225 |
| 226 EventTarget* WorkerGlobalScope::errorEventTarget() | 226 EventTarget* WorkerGlobalScope::errorEventTarget() |
| 227 { | 227 { |
| 228 return this; | 228 return this; |
| 229 } | 229 } |
| 230 | 230 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 { | 334 { |
| 335 return script()->idleNotification(); | 335 return script()->idleNotification(); |
| 336 } | 336 } |
| 337 | 337 |
| 338 WorkerEventQueue* WorkerGlobalScope::eventQueue() const | 338 WorkerEventQueue* WorkerGlobalScope::eventQueue() const |
| 339 { | 339 { |
| 340 return m_eventQueue.get(); | 340 return m_eventQueue.get(); |
| 341 } | 341 } |
| 342 | 342 |
| 343 } // namespace WebCore | 343 } // namespace WebCore |
| OLD | NEW |