Bug 599203 - Don't show incorrect buffered range when currentTime is outside existing ranges. r=dolske a=blocking2.0

This commit is contained in:
Matthew Gregan 2010-09-24 12:48:30 +12:00
parent 3b9311b651
commit 37761d08be

View File

@ -623,19 +623,18 @@
var length = haystack.length;
var low = 0;
var high = length;
while (high - low > 1) {
while (low < high) {
var probe = low + ((high - low) >> 1);
var r = cmp(haystack, probe, needle);
if (r == 0) {
low = probe;
break;
return probe;
} else if (r > 0) {
low = probe + 1;
} else {
high = probe;
}
}
return low < length ? low : -1;
return -1;
}
function bufferedCompare(buffered, i, time) {