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

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

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/java/bindings/src/org/chromium/mojo/bindings/Struct.java
diff --git a/third_party/mojo/src/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Struct.java b/third_party/mojo/src/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Struct.java
index 017d0ef595597509a4e943e27b7097ce04f02cb5..d7369fab2e79571c99cc32d1e03efe61f006c944 100644
--- a/third_party/mojo/src/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Struct.java
+++ b/third_party/mojo/src/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Struct.java
@@ -15,7 +15,6 @@ public abstract class Struct {
* The header for a mojo complex element.
*/
public static final class DataHeader {
-
/**
* The size of a serialized header, in bytes.
*/
@@ -29,18 +28,26 @@ public abstract class Struct {
/**
* The offset of the number of fields field.
*/
- public static final int NUM_FIELDS_OFFSET = 4;
+ public static final int ELEMENTS_OR_VERSION_OFFSET = 4;
+ /**
+ * The size of the object owning this header.
+ */
public final int size;
- public final int numFields;
+
+ /**
+ * Number of element (for an array) or version (for a struct) of the object owning this
+ * header.
+ */
+ public final int elementsOrVersion;
/**
* Constructor.
*/
- public DataHeader(int size, int numFields) {
+ public DataHeader(int size, int elementsOrVersion) {
super();
this.size = size;
- this.numFields = numFields;
+ this.elementsOrVersion = elementsOrVersion;
}
/**
@@ -50,7 +57,7 @@ public abstract class Struct {
public int hashCode() {
final int prime = 31;
int result = 1;
- result = prime * result + numFields;
+ result = prime * result + elementsOrVersion;
result = prime * result + size;
return result;
}
@@ -68,8 +75,7 @@ public abstract class Struct {
return false;
DataHeader other = (DataHeader) object;
- return (numFields == other.numFields &&
- size == other.size);
+ return (elementsOrVersion == other.elementsOrVersion && size == other.size);
}
}

Powered by Google App Engine
This is Rietveld 408576698