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

Unified Diff: Source/platform/blob/BlobRegistry.cpp

Issue 611923002: [WebBlobRegistry] Use char* than WebThreadSafeData (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 2 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 | public/platform/WebBlobRegistry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/blob/BlobRegistry.cpp
diff --git a/Source/platform/blob/BlobRegistry.cpp b/Source/platform/blob/BlobRegistry.cpp
index 16759fca88d05c65dfa36eb869eb31fd140be521..fb8f5c0aeecc7af6b544511d2658c0d2438ef59b 100644
--- a/Source/platform/blob/BlobRegistry.cpp
+++ b/Source/platform/blob/BlobRegistry.cpp
@@ -39,7 +39,6 @@
#include "public/platform/WebBlobData.h"
#include "public/platform/WebBlobRegistry.h"
#include "public/platform/WebString.h"
-#include "public/platform/WebThreadSafeData.h"
#include "wtf/Assertions.h"
#include "wtf/HashMap.h"
#include "wtf/MainThread.h"
@@ -197,18 +196,16 @@ static void addDataToStreamTask(void* context)
{
OwnPtr<BlobRegistryContext> blobRegistryContext = adoptPtr(static_cast<BlobRegistryContext*>(context));
if (WebBlobRegistry* registry = blobRegistry()) {
- WebThreadSafeData webThreadSafeData(blobRegistryContext->streamData);
- registry->addDataToStream(blobRegistryContext->url, webThreadSafeData);
+ RefPtr<RawData> data(blobRegistryContext->streamData);
+ registry->addDataToStream(blobRegistryContext->url, data->data(), data->length());
}
}
void BlobRegistry::addDataToStream(const KURL& url, PassRefPtr<RawData> streamData)
{
if (isMainThread()) {
- if (WebBlobRegistry* registry = blobRegistry()) {
- WebThreadSafeData webThreadSafeData(streamData);
- registry->addDataToStream(url, webThreadSafeData);
- }
+ if (WebBlobRegistry* registry = blobRegistry())
+ registry->addDataToStream(url, streamData->data(), streamData->length());
} else {
OwnPtr<BlobRegistryContext> context = adoptPtr(new BlobRegistryContext(url, streamData));
callOnMainThread(&addDataToStreamTask, context.leakPtr());
« no previous file with comments | « no previous file | public/platform/WebBlobRegistry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698