Index: base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java |
diff --git a/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java b/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java |
index 825bce7cc860035fffd2b4d64372d4277bfa1039..f773859b842dd295f56901844e80477a0e20d362 100644 |
--- a/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java |
+++ b/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java |
@@ -639,4 +639,13 @@ public class ApiCompatibilityUtils { |
window.setFeatureInt(featureNumber, featureValue); |
} |
} |
+ |
+ /** |
+ * Null-safe equivalent of {@code a.equals(b)}. |
+ * |
+ * @see Objects#equals(Object, Object) |
+ */ |
+ public static boolean objectEquals(Object a, Object b) { |
+ return (a == null) ? (b == null) : a.equals(b); |
+ } |
} |