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

Unified Diff: Source/core/fileapi/BlobRegistry.cpp

Issue 23490013: Add method to abort Stream construction to BlobRegistry (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 | « Source/core/fileapi/BlobRegistry.h ('k') | public/platform/WebBlobRegistry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fileapi/BlobRegistry.cpp
diff --git a/Source/core/fileapi/BlobRegistry.cpp b/Source/core/fileapi/BlobRegistry.cpp
index fb902a95a027f5aee3a9d4c0248fa86fdaa62a13..b649b2697be18fb74ad64bd53abff6d6dc652d6e 100644
--- a/Source/core/fileapi/BlobRegistry.cpp
+++ b/Source/core/fileapi/BlobRegistry.cpp
@@ -273,6 +273,24 @@ void BlobRegistry::finalizeStream(const KURL& url)
}
}
+static void abortStreamTask(void* context)
+{
+ OwnPtr<BlobRegistryContext> blobRegistryContext = adoptPtr(static_cast<BlobRegistryContext*>(context));
+ if (WebBlobRegistry* registry = blobRegistry())
+ registry->abortStream(blobRegistryContext->url);
+}
+
+void BlobRegistry::abortStream(const KURL& url)
+{
+ if (isMainThread()) {
+ if (WebBlobRegistry* registry = blobRegistry())
+ registry->abortStream(url);
+ } else {
+ OwnPtr<BlobRegistryContext> context = adoptPtr(new BlobRegistryContext(url));
+ callOnMainThread(&abortStreamTask, context.leakPtr());
+ }
+}
+
static void unregisterStreamURLTask(void* context)
{
OwnPtr<BlobRegistryContext> blobRegistryContext = adoptPtr(static_cast<BlobRegistryContext*>(context));
« no previous file with comments | « Source/core/fileapi/BlobRegistry.h ('k') | public/platform/WebBlobRegistry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698