Index: Source/platform/blob/BlobRegistry.cpp |
diff --git a/Source/platform/blob/BlobRegistry.cpp b/Source/platform/blob/BlobRegistry.cpp |
index fb8f5c0aeecc7af6b544511d2658c0d2438ef59b..41cc90fbed94cae65d3ed9bb69753c7830717f69 100644 |
--- a/Source/platform/blob/BlobRegistry.cpp |
+++ b/Source/platform/blob/BlobRegistry.cpp |
@@ -212,6 +212,24 @@ void BlobRegistry::addDataToStream(const KURL& url, PassRefPtr<RawData> streamDa |
} |
} |
+static void flushStreamTask(void* context) |
+{ |
+ OwnPtr<BlobRegistryContext> blobRegistryContext = adoptPtr(static_cast<BlobRegistryContext*>(context)); |
+ if (WebBlobRegistry* registry = blobRegistry()) |
+ registry->flushStream(blobRegistryContext->url); |
+} |
+ |
+void BlobRegistry::flushStream(const KURL& url) |
+{ |
+ if (isMainThread()) { |
+ if (WebBlobRegistry* registry = blobRegistry()) |
+ registry->flushStream(url); |
+ } else { |
+ OwnPtr<BlobRegistryContext> context = adoptPtr(new BlobRegistryContext(url)); |
+ callOnMainThread(&flushStreamTask, context.leakPtr()); |
+ } |
+} |
+ |
static void finalizeStreamTask(void* context) |
{ |
OwnPtr<BlobRegistryContext> blobRegistryContext = adoptPtr(static_cast<BlobRegistryContext*>(context)); |