Chromium Code Reviews| Index: Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
| diff --git a/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp b/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
| index 3619c911aff7f7998fe840d2678ff9c664281760..5672447e3a8b3d6159ca008c8314f4e104b760ae 100644 |
| --- a/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
| +++ b/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
| @@ -33,6 +33,7 @@ |
| #include "bindings/core/v8/ScriptPromise.h" |
| #include "bindings/core/v8/ScriptState.h" |
| #include "bindings/core/v8/V8ThrowException.h" |
| +#include "core/fetch/MemoryCache.h" |
| #include "core/inspector/ScriptCallStack.h" |
| #include "core/workers/WorkerClients.h" |
| #include "core/workers/WorkerThreadStartupData.h" |
| @@ -123,6 +124,14 @@ void ServiceWorkerGlobalScope::trace(Visitor* visitor) |
| WorkerGlobalScope::trace(visitor); |
| } |
| +void ServiceWorkerGlobalScope::importScripts(const Vector<String>& urls, ExceptionState& exceptionState) |
| +{ |
| + // FIXME: Bust thru the memorycache until the it and serviceworkers are better integrated. |
|
dominicc (has gone to gerrit)
2014/08/04 01:13:48
Be more specific than "better integrated"
It migh
michaeln
2014/08/08 02:58:39
Done.
|
| + for (Vector<String>::const_iterator it = urls.begin(); it != urls.end(); ++it) |
| + MemoryCache::removeURLFromCache(this->executionContext(), completeURL(*it)); |
| + WorkerGlobalScope::importScripts(urls, exceptionState); |
| +} |
| + |
| void ServiceWorkerGlobalScope::logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptCallStack> callStack) |
| { |
| WorkerGlobalScope::logExceptionToConsole(errorMessage, sourceURL, lineNumber, columnNumber, callStack); |