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

Unified Diff: mojo/public/cpp/bindings/lib/bindings_serialization.h

Issue 328183002: More clear comment for ValidateStructHeader. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | mojo/public/cpp/bindings/lib/bindings_serialization.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/bindings_serialization.h
diff --git a/mojo/public/cpp/bindings/lib/bindings_serialization.h b/mojo/public/cpp/bindings/lib/bindings_serialization.h
index 9cd2f1380ad50eb5566619809545dbd300522f39..6bebf90bf950d3a5ce254ea31bddbab88faf64a8 100644
--- a/mojo/public/cpp/bindings/lib/bindings_serialization.h
+++ b/mojo/public/cpp/bindings/lib/bindings_serialization.h
@@ -71,6 +71,7 @@ inline void Decode(T* obj, std::vector<Handle>* handles) {
// If returns true, this function also claims the memory range of the size
// specified in the struct header, starting from |data|.
+// Note: |min_num_bytes| must be no less than sizeof(StructHeader).
bool ValidateStructHeader(const void* data,
uint32_t min_num_bytes,
uint32_t min_num_fields,
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/lib/bindings_serialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698