DO NOT MERGE Revert "Logging for catching memory issue in Parcel"
This reverts commit c65de59762cfc284bd203d97281f5a8f86aba877.
Bug: 37298089
Change-Id: Ib42d27f91bf1408d633a98e6ac7f316175f1e289
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 254f4d5..39bb078 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -2540,16 +2540,8 @@
objectsSize = 0;
} else {
while (objectsSize > 0) {
- if (mObjects[objectsSize-1] < desired) {
- // Check for an object being sliced
- if (desired < mObjects[objectsSize-1] + sizeof(flat_binder_object)) {
- ALOGE("Attempt to shrink Parcel would slice an objects allocated memory");
- return UNKNOWN_ERROR + 0xBADF10;
- }
+ if (mObjects[objectsSize-1] < desired)
break;
- }
- // STOPSHIP: Above code to be replaced with following commented code:
- // if (mObjects[objectsSize-1] + sizeof(flat_binder_object) <= desired) break;
objectsSize--;
}
}