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

Unified Diff: mojo/public/java/bindings/src/org/chromium/mojo/bindings/BindingsHelper.java

Issue 519673002: mojo: Fixing array serialization for java bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Follow review Created 6 years, 4 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/java/bindings/src/org/chromium/mojo/bindings/Decoder.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/java/bindings/src/org/chromium/mojo/bindings/BindingsHelper.java
diff --git a/mojo/public/java/bindings/src/org/chromium/mojo/bindings/BindingsHelper.java b/mojo/public/java/bindings/src/org/chromium/mojo/bindings/BindingsHelper.java
index d94796831b0e28de4c8995435671adbba586b5a1..9ce20b5dd6840aec96c18ce9992b9e559bf3f1fc 100644
--- a/mojo/public/java/bindings/src/org/chromium/mojo/bindings/BindingsHelper.java
+++ b/mojo/public/java/bindings/src/org/chromium/mojo/bindings/BindingsHelper.java
@@ -36,6 +36,13 @@ public class BindingsHelper {
}
/**
+ * Align |size| on {@link BindingsHelper#ALIGNMENT}.
+ */
+ public static long align(long size) {
+ return (size + ALIGNMENT - 1) & ~(ALIGNMENT - 1);
+ }
+
+ /**
* Compute the size in bytes of the given string encoded as utf8.
*/
public static int utf8StringSizeInBytes(String s) {
« no previous file with comments | « no previous file | mojo/public/java/bindings/src/org/chromium/mojo/bindings/Decoder.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698