Index: Source/core/workers/WorkerGlobalScope.cpp |
diff --git a/Source/core/workers/WorkerGlobalScope.cpp b/Source/core/workers/WorkerGlobalScope.cpp |
index 0617ab47c55862a7e09b0e168949a3791af4442c..a06e0a2cc0612827da1a2b1f0a10dfb4a57604a4 100644 |
--- a/Source/core/workers/WorkerGlobalScope.cpp |
+++ b/Source/core/workers/WorkerGlobalScope.cpp |
@@ -32,6 +32,7 @@ |
#include "bindings/core/v8/ScheduledAction.h" |
#include "bindings/core/v8/ScriptSourceCode.h" |
#include "bindings/core/v8/ScriptValue.h" |
+#include "bindings/core/v8/V8CacheOptions.h" |
#include "core/dom/ActiveDOMObject.h" |
#include "core/dom/AddConsoleMessageTask.h" |
#include "core/dom/ContextLifecycleNotifier.h" |
@@ -84,6 +85,7 @@ public: |
WorkerGlobalScope::WorkerGlobalScope(const KURL& url, const String& userAgent, WorkerThread* thread, double timeOrigin, const SecurityOrigin* starterOrigin, PassOwnPtrWillBeRawPtr<WorkerClients> workerClients) |
: m_url(url) |
, m_userAgent(userAgent) |
+ , m_v8CacheOptions(V8CacheOptionsDefault) |
, m_script(adoptPtr(new WorkerScriptController(*this))) |
, m_thread(thread) |
, m_workerInspectorController(adoptRefWillBeNoop(new WorkerInspectorController(this))) |
@@ -264,7 +266,9 @@ void WorkerGlobalScope::importScripts(const Vector<String>& urls, ExceptionState |
InspectorInstrumentation::scriptImported(&executionContext, scriptLoader->identifier(), scriptLoader->script()); |
RefPtrWillBeRawPtr<ErrorEvent> errorEvent = nullptr; |
- m_script->evaluate(ScriptSourceCode(scriptLoader->script(), scriptLoader->responseURL()), &errorEvent); |
+ OwnPtr<Vector<char>> cachedMetaData(scriptLoader->releaseCachedMetadata()); |
+ OwnPtr<CachedMetadataHandler> handler(createWorkerScriptCachedMetadataHandler(completeURL, cachedMetaData.get())); |
+ m_script->evaluate(ScriptSourceCode(scriptLoader->script(), scriptLoader->responseURL()), &errorEvent, handler.get(), m_v8CacheOptions); |
if (errorEvent) { |
m_script->rethrowExceptionFromImportedScript(errorEvent.release(), exceptionState); |
return; |