From 0f260b7da454b6f99939fb97c64ae6b947f7aa2c Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Wed, 20 Aug 2008 10:56:42 +0000 Subject: [PATCH] revert removal of comparator function in getSortedMarks(), the issue remains --- content/buffer.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/content/buffer.js b/content/buffer.js index 0bd04b69..26966067 100644 --- a/content/buffer.js +++ b/content/buffer.js @@ -1451,14 +1451,20 @@ liberator.Marks = function () //{{{ lmarks.push([mark, localMarks[mark][i]]); } } + lmarks.sort(); // URL marks var umarks = []; + // FIXME: why does umarks.sort() cause a "Component is not available = + // NS_ERROR_NOT_AVAILABLE" exception when used here? for (var mark in urlMarks) umarks.push([mark, urlMarks[mark]]); - umarks.sort(); + + umarks.sort(function (a, b) { + return a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0; + }); return lmarks.concat(umarks); }