Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2086)

Unified Diff: Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp

Issue 419693002: reviving xiang's cl as a stopgap for the memcache + serviceworker interop problem (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698