diff options
Diffstat (limited to 'WebCore/inspector/front-end/utilities.js')
-rw-r--r-- | WebCore/inspector/front-end/utilities.js | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/WebCore/inspector/front-end/utilities.js b/WebCore/inspector/front-end/utilities.js index 66cf284..e8adff6 100644 --- a/WebCore/inspector/front-end/utilities.js +++ b/WebCore/inspector/front-end/utilities.js @@ -732,12 +732,6 @@ Array.convert = function(list) function insertionIndexForObjectInListSortedByFunction(anObject, aList, aFunction) { - // indexOf returns (-lowerBound - 1). Taking (-result - 1) works out to lowerBound. - return (-indexOfObjectInListSortedByFunction(anObject, aList, aFunction) - 1); -} - -function indexOfObjectInListSortedByFunction(anObject, aList, aFunction) -{ var first = 0; var last = aList.length - 1; var floor = Math.floor; @@ -760,9 +754,7 @@ function indexOfObjectInListSortedByFunction(anObject, aList, aFunction) } } - // By returning 1 less than the negative lower search bound, we can reuse this function - // for both indexOf and insertionIndexFor, with some simple arithmetic. - return (-first - 1); + return first; } String.sprintf = function(format) |