android: Fix rank comparator overflow
Native can pass up std::numeric_limits<unsigned int>::max() as the frame depth. We store this in a long in java which does not overflow. However comparator currently does substracts two frame depths and casts it down to int to get the sign. This can cause int overflow and change the result. Use Long.signum instead. Change-Id: Id0591250d4ae588bd3f54964fd53e3211402133a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1610083Reviewed-by:ssid <ssid@chromium.org> Commit-Queue: Bo <boliu@chromium.org> Cr-Commit-Position: refs/heads/master@{#659779}
Showing
Please register or sign in to comment