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

Unified Diff: third_party/WebKit/Source/core/fileapi/URLFileAPI.cpp

Issue 1938183002: Deprecate URL.createObjectURL/revokeObjectURL in Service Workers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: derp Created 4 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/Deprecation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fileapi/URLFileAPI.cpp
diff --git a/third_party/WebKit/Source/core/fileapi/URLFileAPI.cpp b/third_party/WebKit/Source/core/fileapi/URLFileAPI.cpp
index 985a576fc2f4c8507fe9e99d7b9c304267533fce..c6ae7b43b48fa2ca5c2f5c69659ef5a8f1eaf8fa 100644
--- a/third_party/WebKit/Source/core/fileapi/URLFileAPI.cpp
+++ b/third_party/WebKit/Source/core/fileapi/URLFileAPI.cpp
@@ -8,6 +8,8 @@
#include "core/dom/DOMURL.h"
#include "core/dom/ExecutionContext.h"
#include "core/fileapi/Blob.h"
+#include "core/frame/Deprecation.h"
+#include "core/frame/UseCounter.h"
#include "core/html/PublicURLManager.h"
namespace blink {
@@ -18,6 +20,9 @@ String URLFileAPI::createObjectURL(ExecutionContext* executionContext, Blob* blo
DCHECK(blob);
DCHECK(executionContext);
+ if (executionContext->isServiceWorkerGlobalScope())
+ Deprecation::countDeprecation(executionContext, UseCounter::URLMethodCreateObjectURLServiceWorker);
+
if (blob->isClosed()) {
exceptionState.throwDOMException(InvalidStateError, String(blob->isFile() ? "File" : "Blob") + " has been closed.");
return String();
@@ -30,6 +35,9 @@ void URLFileAPI::revokeObjectURL(ExecutionContext* executionContext, const Strin
{
DCHECK(executionContext);
+ if (executionContext->isServiceWorkerGlobalScope())
+ Deprecation::countDeprecation(executionContext, UseCounter::URLMethodRevokeObjectURLServiceWorker);
+
KURL url(KURL(), urlString);
executionContext->removeURLFromMemoryCache(url);
executionContext->publicURLManager().revoke(url);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/Deprecation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698