Bug 1710255 - Use instanceof to test nodes instead of getClassName(). r=darktrojan
--HG-- extra : histedit_source : f1bd866ac5ddebc28e2f2f896afefaace6e05427%2Ca5aa2896ed45b1b52a03e7b485f53bb7f1536f5d
This commit is contained in:
Родитель
933436ac02
Коммит
4d210adb77
|
@ -711,10 +711,7 @@ var specialTabs = {
|
|||
let onDownload = aEvent => {
|
||||
let request = aEvent.target;
|
||||
let dom = request.response;
|
||||
if (
|
||||
request.status != 200 ||
|
||||
ChromeUtils.getClassName(dom) !== "HTMLDocument"
|
||||
) {
|
||||
if (request.status != 200 || !(dom instanceof HTMLDocument)) {
|
||||
onDownloadError(aEvent);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ FeedParser.prototype = {
|
|||
* nothing to do condition.
|
||||
*/
|
||||
parseFeed(aFeed, aDOM) {
|
||||
if (ChromeUtils.getClassName(aDOM) !== "XMLDocument") {
|
||||
if (!(aDOM instanceof XMLDocument)) {
|
||||
// No xml doc.
|
||||
aFeed.onParseError(aFeed);
|
||||
return [];
|
||||
|
|
Загрузка…
Ссылка в новой задаче