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

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

Issue 1526533002: [mojo] Add pickling support for native-only structs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bindings-4-bool-deserialize
Patch Set: Created 5 years 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: mojo/public/cpp/bindings/lib/bindings_internal.h
diff --git a/mojo/public/cpp/bindings/lib/bindings_internal.h b/mojo/public/cpp/bindings/lib/bindings_internal.h
index 4c5917a1c61710b5640ad6b32e7024d825ed10fb..d55a397c6c192ce718fa47ebc9ee203762a48171 100644
--- a/mojo/public/cpp/bindings/lib/bindings_internal.h
+++ b/mojo/public/cpp/bindings/lib/bindings_internal.h
@@ -37,6 +37,12 @@ union StructPointer {
};
static_assert(sizeof(StructPointer<char>) == 8, "Bad_sizeof(StructPointer)");
+union NativePointer {
yzshen1 2015/12/15 21:20:26 Please define it as an alias of ArrayPointer<uint8
Ken Rockot(use gerrit already) 2015/12/15 23:31:07 Actually I've decided to just get rid of this alto
+ uint64_t offset;
+ Array_Data<uint8_t>* ptr;
+};
+static_assert(sizeof(NativePointer) == 8, "Bad_sizeof(NativePointer)");
+
template <typename T>
union ArrayPointer {
uint64_t offset;

Powered by Google App Engine
This is Rietveld 408576698