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

Unified Diff: content/child/url_response_body_consumer.h

Issue 2644053002: [Mojo-Loading] Split too large data chunk in renderer (Closed)
Patch Set: fix Created 3 years, 11 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 | content/child/url_response_body_consumer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/url_response_body_consumer.h
diff --git a/content/child/url_response_body_consumer.h b/content/child/url_response_body_consumer.h
index b35abc88d2f18f0ca1a754f34d8537903d724a2a..1c33aaada7066d2247e73d6070aba40e174b86b3 100644
--- a/content/child/url_response_body_consumer.h
+++ b/content/child/url_response_body_consumer.h
@@ -51,6 +51,13 @@ class CONTENT_EXPORT URLResponseBodyConsumer final
void SetDefersLoading();
void UnsetDefersLoading();
+ // The maximal number of bytes consumed in a task. When there are more bytes
+ // in the data pipe, they will be consumed in following tasks. Setting a too
+ // small number will generate ton of tasks but setting a too large number will
+ // lead to thread janks. Also, some clients cannot handle too large chunks
+ // (512k for example).
+ static constexpr uint32_t kMaxNumConsumedBytesInTask = 64 * 1024;
+
private:
friend class base::RefCounted<URLResponseBodyConsumer>;
~URLResponseBodyConsumer();
« no previous file with comments | « no previous file | content/child/url_response_body_consumer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698