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

Unified Diff: third_party/WebKit/Source/core/xml/parser/SharedBufferReader.h

Issue 1571233003: Fix errors caused by unsafe conversions to/from size_t (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: improved ALLOW_NUMERIC_ARG_TYPES_PROMOTABLE_TO Created 4 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
Index: third_party/WebKit/Source/core/xml/parser/SharedBufferReader.h
diff --git a/third_party/WebKit/Source/core/xml/parser/SharedBufferReader.h b/third_party/WebKit/Source/core/xml/parser/SharedBufferReader.h
index d61dcc7465023232972347dcf01db6d178b0ab44..08587929e8af956fcb7f557adab791076e92b72a 100644
--- a/third_party/WebKit/Source/core/xml/parser/SharedBufferReader.h
+++ b/third_party/WebKit/Source/core/xml/parser/SharedBufferReader.h
@@ -49,11 +49,12 @@ public:
~SharedBufferReader();
// Returns the number of bytes that were read (i.e. written to |outputBuffer|).
- int readData(char* outputBuffer, unsigned askedToRead);
+ // TODO(junov): use size_t instead of int. Until then, readData uses safeCast internally.
+ int readData(char* outputBuffer, int askedToRead);
private:
RefPtr<SharedBuffer> m_buffer;
- unsigned m_currentOffset;
+ size_t m_currentOffset;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698