Bug 851845 - Intermittent (NS_ERROR_NOT_AVAILABLE) [nsIDOMWindowUtils.getScrollbarSize]; r=jaws

This commit is contained in:
Tim Taubert 2013-03-21 09:23:02 +01:00
Родитель 19036f920d
Коммит 50b719379f
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -244,7 +244,14 @@ this.PageThumbs = {
let utils = aWindow.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils);
let sbWidth = {}, sbHeight = {};
utils.getScrollbarSize(false, sbWidth, sbHeight);
try {
utils.getScrollbarSize(false, sbWidth, sbHeight);
} catch (e) {
// This might fail if the window does not have a presShell.
Cu.reportError("Unable to get scrollbar size in _determineCropSize.");
sbWidth.value = sbHeight.value = 0;
}
// Even in RTL mode, scrollbars are always on the right.
// So there's no need to determine a left offset.