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

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

Issue 954643002: Update mojo sdk to rev 3d23dae011859a2aae49f1d1adde705c8e85d819 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use run_renderer_in_process() Created 5 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
Index: third_party/mojo/src/mojo/public/cpp/bindings/lib/bindings_serialization.h
diff --git a/third_party/mojo/src/mojo/public/cpp/bindings/lib/bindings_serialization.h b/third_party/mojo/src/mojo/public/cpp/bindings/lib/bindings_serialization.h
index 6bebf90bf950d3a5ce254ea31bddbab88faf64a8..ceb213d339c17914d3c1bb691acac8080f0759c4 100644
--- a/third_party/mojo/src/mojo/public/cpp/bindings/lib/bindings_serialization.h
+++ b/third_party/mojo/src/mojo/public/cpp/bindings/lib/bindings_serialization.h
@@ -69,13 +69,15 @@ inline void Decode(T* obj, std::vector<Handle>* handles) {
obj->ptr->DecodePointersAndHandles(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,
- BoundsChecker* bounds_checker);
+// Validates that |data| contains a valid struct header, in terms of alignment
+// and size (i.e., the |num_bytes| field of the header is sufficient for storing
+// the header itself). Besides, it checks that the memory range
+// [data, data + num_bytes) is not marked as occupied by other objects in
+// |bounds_checker|. On success, the memory range is marked as occupied.
+// Note: Does not verify |version| or that |num_bytes| is correct for the
+// claimed version.
+bool ValidateStructHeaderAndClaimMemory(const void* data,
+ BoundsChecker* bounds_checker);
} // namespace internal
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698