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

Unified Diff: third_party/WebKit/Source/core/fileapi/FileReader.cpp

Issue 2645303002: Use a new Supplement constructor for supplements in core/ (Closed)
Patch Set: temp 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 | third_party/WebKit/Source/core/html/parser/HTMLDocumentParserTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fileapi/FileReader.cpp
diff --git a/third_party/WebKit/Source/core/fileapi/FileReader.cpp b/third_party/WebKit/Source/core/fileapi/FileReader.cpp
index 9017fb79b94328a318b702d3c7720f3675051243..805822b5de986f891f76341a30fa185e542c4269 100644
--- a/third_party/WebKit/Source/core/fileapi/FileReader.cpp
+++ b/third_party/WebKit/Source/core/fileapi/FileReader.cpp
@@ -81,7 +81,7 @@ class FileReader::ThrottlingController final
ThrottlingController* controller = static_cast<ThrottlingController*>(
Supplement<ExecutionContext>::from(*context, supplementName()));
if (!controller) {
- controller = new ThrottlingController;
+ controller = new ThrottlingController(*context);
provideTo(*context, supplementName(), controller);
}
return controller;
@@ -126,8 +126,9 @@ class FileReader::ThrottlingController final
}
private:
- ThrottlingController()
- : m_maxRunningReaders(kMaxOutstandingRequestsPerThread) {}
+ explicit ThrottlingController(ExecutionContext& context)
+ : Supplement<ExecutionContext>(context),
+ m_maxRunningReaders(kMaxOutstandingRequestsPerThread) {}
void pushReader(FileReader* reader) {
if (m_pendingReaders.isEmpty() &&
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/parser/HTMLDocumentParserTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698