Commit 6fb8f66b by olly Committed by Oliver Woodman

Remove assertion causing failure on some Samsung devices

The assertion was so weak it probably wouldn't detect genuine
misuse of the DefaultAllocator API, so it seems fine just to
remove it.

We don't really know what happens when the player is allowed to
continue on the affected devices, but hopefully it either "just
works" or fails in a more graceful way.

Issue: #4532

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217113060
parent d5113703
...@@ -117,19 +117,6 @@ public final class DefaultAllocator implements Allocator { ...@@ -117,19 +117,6 @@ public final class DefaultAllocator implements Allocator {
Math.max(availableAllocations.length * 2, availableCount + allocations.length)); Math.max(availableAllocations.length * 2, availableCount + allocations.length));
} }
for (Allocation allocation : allocations) { for (Allocation allocation : allocations) {
// Weak sanity check that the allocation probably originated from this pool.
if (allocation.data != initialAllocationBlock
&& allocation.data.length != individualAllocationSize) {
throw new IllegalArgumentException(
"Unexpected allocation: "
+ System.identityHashCode(allocation.data)
+ ", "
+ System.identityHashCode(initialAllocationBlock)
+ ", "
+ allocation.data.length
+ ", "
+ individualAllocationSize);
}
availableAllocations[availableCount++] = allocation; availableAllocations[availableCount++] = allocation;
} }
allocatedCount -= allocations.length; allocatedCount -= allocations.length;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment