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
This commit is contained in:
olly 2018-10-15 02:49:05 -07:00 committed by Oliver Woodman
parent d511370338
commit 6fb8f66ba6

View File

@ -117,19 +117,6 @@ public final class DefaultAllocator implements Allocator {
Math.max(availableAllocations.length * 2, availableCount + allocations.length));
}
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;
}
allocatedCount -= allocations.length;