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

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

Issue 1044203004: [Storage] Cache storage inspection on all the frames! (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Cleanup, re-adding SWGlobalScope support, tested for pages and SW's Created 5 years, 9 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/GlobalCacheStorage.cpp
diff --git a/Source/modules/serviceworkers/GlobalCacheStorage.cpp b/Source/modules/serviceworkers/GlobalCacheStorage.cpp
index 9b1a047220c494e042647734629a8f73c2e2b268..82d68b2ae7a190e545ebaacc84408c6bc1e0bc91 100644
--- a/Source/modules/serviceworkers/GlobalCacheStorage.cpp
+++ b/Source/modules/serviceworkers/GlobalCacheStorage.cpp
@@ -32,9 +32,8 @@ public:
return *supplement;
}
- CacheStorage* caches(ScriptState* scriptState, ExceptionState& exceptionState)
+ CacheStorage* caches(ExecutionContext* context, ExceptionState& exceptionState)
{
- ExecutionContext* context = scriptState->executionContext();
if (!context->securityOrigin()->canAccessCacheStorage()) {
if (context->securityContext().isSandboxed(SandboxOrigin))
exceptionState.throwSecurityError("Cache storage is disabled because the context is sandboxed and lacks the 'allow-same-origin' flag.");
@@ -71,14 +70,14 @@ private:
} // namespace
-CacheStorage* GlobalCacheStorage::caches(ScriptState* scriptState, DOMWindow& window, ExceptionState& exceptionState)
+CacheStorage* GlobalCacheStorage::caches(DOMWindow& window, ExceptionState& exceptionState)
{
- return GlobalCacheStorageImpl<LocalDOMWindow>::from(toLocalDOMWindow(window), window.executionContext()).caches(scriptState, exceptionState);
+ return GlobalCacheStorageImpl<LocalDOMWindow>::from(toLocalDOMWindow(window), window.executionContext()).caches(window.executionContext(), exceptionState);
}
-CacheStorage* GlobalCacheStorage::caches(ScriptState* scriptState, WorkerGlobalScope& worker, ExceptionState& exceptionState)
+CacheStorage* GlobalCacheStorage::caches(WorkerGlobalScope& worker, ExceptionState& exceptionState)
{
- return GlobalCacheStorageImpl<WorkerGlobalScope>::from(worker, worker.executionContext()).caches(scriptState, exceptionState);
+ return GlobalCacheStorageImpl<WorkerGlobalScope>::from(worker, worker.executionContext()).caches(worker.executionContext(), exceptionState);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698