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

Unified Diff: chrome/common/spellcheck_marker.h

Issue 1619363002: Add compile time checks against longs being used in IPC structs on 32 bit Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more per Dmitry 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: chrome/common/spellcheck_marker.h
diff --git a/chrome/common/spellcheck_marker.h b/chrome/common/spellcheck_marker.h
index cb2de3f7bf5fd58f56d67391913d3185313399c3..4305c22f0efab67ff359e506f6e4e5f4f5a03a74 100644
--- a/chrome/common/spellcheck_marker.h
+++ b/chrome/common/spellcheck_marker.h
@@ -23,12 +23,13 @@ class SpellCheckMarker {
};
// IPC requires a default constructor.
- SpellCheckMarker() : hash(0xFFFFFFFF), offset(static_cast<size_t>(-1)) {}
+ SpellCheckMarker() : hash(0xFFFFFFFF), offset(UINT32_MAX) {}
- SpellCheckMarker(uint32_t hash, size_t offset) : hash(hash), offset(offset) {}
+ SpellCheckMarker(uint32_t hash, uint32_t offset)
+ : hash(hash), offset(offset) {}
uint32_t hash;
- size_t offset;
+ uint32_t offset;
};
#endif // CHROME_COMMON_SPELLCHECK_MARKER_H_

Powered by Google App Engine
This is Rietveld 408576698