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

Unified Diff: third_party/WebKit/Source/core/dom/DOMURL.cpp

Issue 1908263002: Don't expose URL.createObjectURL and revokeObjectURL to Service Workers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: third_party/WebKit/Source/core/dom/DOMURL.cpp
diff --git a/third_party/WebKit/Source/core/dom/DOMURL.cpp b/third_party/WebKit/Source/core/dom/DOMURL.cpp
index 1b1373b96f9ef4f977f6d0c17e8fd3e6b5227c86..bd64b4be072a112cb26c66a92d9ff67e186a7478 100644
--- a/third_party/WebKit/Source/core/dom/DOMURL.cpp
+++ b/third_party/WebKit/Source/core/dom/DOMURL.cpp
@@ -83,18 +83,6 @@ void DOMURL::setSearch(const String& value)
updateSearchParams(value);
}
-String DOMURL::createObjectURL(ExecutionContext* executionContext, Blob* blob, ExceptionState& exceptionState)
-{
- DCHECK(blob);
- if (!executionContext)
- return String();
- if (blob->hasBeenClosed()) {
- exceptionState.throwDOMException(InvalidStateError, String(blob->isFile() ? "File" : "Blob") + " has been closed.");
- return String();
- }
- return createPublicURL(executionContext, blob, blob->uuid());
-}
-
String DOMURL::createPublicURL(ExecutionContext* executionContext, URLRegistrable* registrable, const String& uuid)
{
KURL publicURL = BlobURL::createPublicURL(executionContext->getSecurityOrigin());
@@ -106,16 +94,6 @@ String DOMURL::createPublicURL(ExecutionContext* executionContext, URLRegistrabl
return publicURL.getString();
}
-void DOMURL::revokeObjectURL(ExecutionContext* executionContext, const String& urlString)
-{
- if (!executionContext)
- return;
-
- KURL url(KURL(), urlString);
- executionContext->removeURLFromMemoryCache(url);
- executionContext->publicURLManager().revoke(url);
-}
-
void DOMURL::revokeObjectUUID(ExecutionContext* executionContext, const String& uuid)
{
if (!executionContext)

Powered by Google App Engine
This is Rietveld 408576698