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

Unified Diff: ui/gfx/range/range.h

Issue 1684793003: Add comments for struct members that were changed from size_t to uin32_t or uint64_t for IPC safety. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « media/cast/sender/frame_sender.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/range/range.h
diff --git a/ui/gfx/range/range.h b/ui/gfx/range/range.h
index c99ca22041e40eef0398cca027233dea81c557e9..5da71d60c96bb7811a60cb405b015a9fc807fc12 100644
--- a/ui/gfx/range/range.h
+++ b/ui/gfx/range/range.h
@@ -108,6 +108,9 @@ class GFX_EXPORT Range {
std::string ToString() const;
private:
+ // Note: we use uint32_t instead of size_t because this struct is sent over
+ // IPC which could span 32 & 64 bit processes. This is fine since text spans
+ // shouldn't exceed UINT32_MAX even on 64 bit builds.
uint32_t start_;
uint32_t end_;
};
« no previous file with comments | « media/cast/sender/frame_sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698