| 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 scriptLoader->setRequestContext(blink::WebURLRequest::RequestContextScri
pt); | 261 scriptLoader->setRequestContext(blink::WebURLRequest::RequestContextScri
pt); |
| 262 scriptLoader->loadSynchronously(executionContext, completeURL, AllowCros
sOriginRequests); | 262 scriptLoader->loadSynchronously(executionContext, completeURL, AllowCros
sOriginRequests); |
| 263 | 263 |
| 264 // If the fetching attempt failed, throw a NetworkError exception and ab
ort all these steps. | 264 // If the fetching attempt failed, throw a NetworkError exception and ab
ort all these steps. |
| 265 if (scriptLoader->failed()) { | 265 if (scriptLoader->failed()) { |
| 266 exceptionState.throwDOMException(NetworkError, "The script at '" + c
ompleteURL.elidedString() + "' failed to load."); | 266 exceptionState.throwDOMException(NetworkError, "The script at '" + c
ompleteURL.elidedString() + "' failed to load."); |
| 267 return; | 267 return; |
| 268 } | 268 } |
| 269 | 269 |
| 270 InspectorInstrumentation::scriptImported(&executionContext, scriptLoader
->identifier(), scriptLoader->script()); | 270 InspectorInstrumentation::scriptImported(&executionContext, scriptLoader
->identifier(), scriptLoader->script()); |
| 271 scriptLoaded(scriptLoader->script().length(), scriptLoader->cachedMetada
ta() ? scriptLoader->cachedMetadata()->size() : 0); |
| 271 | 272 |
| 272 RefPtrWillBeRawPtr<ErrorEvent> errorEvent = nullptr; | 273 RefPtrWillBeRawPtr<ErrorEvent> errorEvent = nullptr; |
| 273 OwnPtr<Vector<char>> cachedMetaData(scriptLoader->releaseCachedMetadata(
)); | 274 OwnPtr<Vector<char>> cachedMetaData(scriptLoader->releaseCachedMetadata(
)); |
| 274 OwnPtr<CachedMetadataHandler> handler(createWorkerScriptCachedMetadataHa
ndler(completeURL, cachedMetaData.get())); | 275 OwnPtr<CachedMetadataHandler> handler(createWorkerScriptCachedMetadataHa
ndler(completeURL, cachedMetaData.get())); |
| 275 m_script->evaluate(ScriptSourceCode(scriptLoader->script(), scriptLoader
->responseURL()), &errorEvent, handler.get(), m_v8CacheOptions); | 276 m_script->evaluate(ScriptSourceCode(scriptLoader->script(), scriptLoader
->responseURL()), &errorEvent, handler.get(), m_v8CacheOptions); |
| 276 if (errorEvent) { | 277 if (errorEvent) { |
| 277 m_script->rethrowExceptionFromImportedScript(errorEvent.release(), e
xceptionState); | 278 m_script->rethrowExceptionFromImportedScript(errorEvent.release(), e
xceptionState); |
| 278 return; | 279 return; |
| 279 } | 280 } |
| 280 } | 281 } |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 visitor->trace(m_timers); | 386 visitor->trace(m_timers); |
| 386 visitor->trace(m_messageStorage); | 387 visitor->trace(m_messageStorage); |
| 387 visitor->trace(m_pendingMessages); | 388 visitor->trace(m_pendingMessages); |
| 388 HeapSupplementable<WorkerGlobalScope>::trace(visitor); | 389 HeapSupplementable<WorkerGlobalScope>::trace(visitor); |
| 389 #endif | 390 #endif |
| 390 ExecutionContext::trace(visitor); | 391 ExecutionContext::trace(visitor); |
| 391 EventTargetWithInlineData::trace(visitor); | 392 EventTargetWithInlineData::trace(visitor); |
| 392 } | 393 } |
| 393 | 394 |
| 394 } // namespace blink | 395 } // namespace blink |
| OLD | NEW |