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

Unified Diff: third_party/WebKit/Source/core/fileapi/FileReaderLoader.h

Issue 2837873007: Tell V8 about the extra memory being held by FileReader objects. (Closed)
Patch Set: more accurate Created 3 years, 8 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
Index: third_party/WebKit/Source/core/fileapi/FileReaderLoader.h
diff --git a/third_party/WebKit/Source/core/fileapi/FileReaderLoader.h b/third_party/WebKit/Source/core/fileapi/FileReaderLoader.h
index 3bccac7eeacccfcaf26395af2c450ba5a282da33..3fa973bbfcd3ce56aafcd033ed0cff257b4403ac 100644
--- a/third_party/WebKit/Source/core/fileapi/FileReaderLoader.h
+++ b/third_party/WebKit/Source/core/fileapi/FileReaderLoader.h
@@ -112,10 +112,13 @@ class CORE_EXPORT FileReaderLoader final : public ThreadableLoaderClient {
FileReaderLoader(ReadType, FileReaderLoaderClient*);
void Cleanup();
+ void ReportAdditionalMemoryUsageToV8(int64_t usage);
+ void UnreportMemoryUsageToV8();
void Failed(FileError::ErrorCode);
- void ConvertToText();
- void ConvertToDataURL();
+ String ConvertToText();
+ String ConvertToDataURL();
+ void SetStringResult(const String&);
static FileError::ErrorCode HttpStatusCodeToErrorCode(int);
@@ -144,7 +147,7 @@ class CORE_EXPORT FileReaderLoader final : public ThreadableLoaderClient {
// the buffer for receiving data of m_totalBytes is allocated and never grow
// even when extra data is appeneded.
long long total_bytes_;
-
+ int64_t memory_usage_reported_to_v8_ = 0;
michaeln 2017/04/28 00:54:25 i can switch more of the data members to initializ
dmurph 2017/04/28 20:39:44 That would be great actually. I like that style.
bool has_range_;
unsigned range_start_;
unsigned range_end_;

Powered by Google App Engine
This is Rietveld 408576698