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

Unified Diff: base/pickle.h

Issue 9641005: Remove Pickle::WriteSize() now that it has no remaining callers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/pickle.h
===================================================================
--- base/pickle.h (revision 125321)
+++ base/pickle.h (working copy)
@@ -98,9 +98,15 @@
bool WriteInt(int value) {
return WriteBytes(&value, sizeof(value));
}
+ // WARNING: DO NOT USE WriteLong() IF PICKLES ARE PERSISTED IN ANY WAY.
+ // WriteLong() writes whatever a "long" is on this architecture. On 32-bit
+ // platforms, it is 32 bits. On 64-bit platforms, it is 64 bits. If persisted
+ // pickles are still around after upgrading to 64-bit, or if they are copied
+ // between dissimilar systems, YOUR PICKLES WILL HAVE GONE BAD.
jar (doing other things) 2012/03/09 22:13:36 IMO, you have discovered a problem.... and it is a
Mike Mammarella 2012/03/10 00:24:42 Looks like WriteSize() might be feasible to remove
bool WriteLong(long value) {
return WriteBytes(&value, sizeof(value));
}
+ // WARNING: SEE THE WARNING FOR WriteLong() ABOVE. USE WriteSize() CAREFULLY.
bool WriteSize(size_t value) {
return WriteBytes(&value, sizeof(value));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698