Bug 1383122 - P4. Don't set src attribute to empty string. r=jwwang

MozReview-Commit-ID: EzQCVIIjOIe

--HG--
extra : rebase_source : af21c6749f22ae98cf3d81577eb0476dcca99035
This commit is contained in:
Jean-Yves Avenard 2017-07-24 10:58:03 +02:00
Родитель 64c70317ce
Коммит bb0627f06b
1 изменённых файлов: 2 добавлений и 5 удалений

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

@ -1558,13 +1558,10 @@ function getMajorMimeType(mimetype) {
// Force releasing decoder to avoid timeout in waiting for decoding resource.
function removeNodeAndSource(n) {
n.remove();
// Clearing srcObject and/or src will actually set them to some default
// URI that will fail to load, so make sure we don't produce a spurious
// bailing error.
n.onerror = null;
// reset |srcObject| first since it takes precedence over |src|.
n.srcObject = null;
n.src = "";
n.removeAttribute("src");
n.load();
while (n.firstChild) {
n.firstChild.remove();
}