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

Unified Diff: Source/core/fetch/ResourceLoader.cpp

Issue 100563004: Redirect HTML resource bytes directly to parser thread (Blink side CL) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@parserthread_decodermove
Patch Set: Conflict fix Created 6 years, 9 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/fetch/ResourceLoader.h ('k') | Source/core/html/parser/BackgroundHTMLParser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/ResourceLoader.cpp
diff --git a/Source/core/fetch/ResourceLoader.cpp b/Source/core/fetch/ResourceLoader.cpp
index 087644a9ad5816a44d59e1d5d373088373ea7550..6391043dba2da7b134a5bde694dab745adc33e4d 100644
--- a/Source/core/fetch/ResourceLoader.cpp
+++ b/Source/core/fetch/ResourceLoader.cpp
@@ -40,6 +40,7 @@
#include "platform/network/ResourceError.h"
#include "public/platform/Platform.h"
#include "public/platform/WebData.h"
+#include "public/platform/WebThreadedDataReceiver.h"
#include "public/platform/WebURLError.h"
#include "public/platform/WebURLRequest.h"
#include "public/platform/WebURLResponse.h"
@@ -179,6 +180,18 @@ void ResourceLoader::setDefersLoading(bool defers)
}
}
+void ResourceLoader::attachThreadedDataReceiver(PassOwnPtr<blink::WebThreadedDataReceiver> threadedDataReceiver)
+{
+ if (m_loader) {
+ // The implementor of the WebURLLoader assumes ownership of the
+ // threaded data receiver if it signals that it got successfully
+ // attached.
+ blink::WebThreadedDataReceiver* rawThreadedDataReceiver = threadedDataReceiver.leakPtr();
+ if (!m_loader->attachThreadedDataReceiver(rawThreadedDataReceiver))
+ delete rawThreadedDataReceiver;
+ }
+}
+
void ResourceLoader::didDownloadData(blink::WebURLLoader*, int length, int encodedDataLength)
{
RefPtr<ResourceLoader> protect(this);
« no previous file with comments | « Source/core/fetch/ResourceLoader.h ('k') | Source/core/html/parser/BackgroundHTMLParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698