зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1613308 - Catch errors drawing the favicon when dragging from the identity block. r=ewright
Differential Revision: https://phabricator.services.mozilla.com/D63318 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
c90fa01f07
Коммит
57e87258be
|
@ -1299,7 +1299,13 @@ var gIdentityHandler = {
|
|||
let tabIcon = gBrowser.selectedTab.iconImage;
|
||||
let image = new Image();
|
||||
image.src = tabIcon.src;
|
||||
ctx.drawImage(image, 0, 0, 16 * scale, 16 * scale);
|
||||
try {
|
||||
ctx.drawImage(image, 0, 0, 16 * scale, 16 * scale);
|
||||
} catch (e) {
|
||||
// Sites might specify invalid data URIs favicons that
|
||||
// will result in errors when trying to draw, we can
|
||||
// just ignore this case and not paint any favicon.
|
||||
}
|
||||
|
||||
let dt = event.dataTransfer;
|
||||
dt.setData("text/x-moz-url", urlString);
|
||||
|
|
Загрузка…
Ссылка в новой задаче