Bug 370021 - Element Properties window is broken on links without ping attribute when browser.send_pings.require_same_host is set to true

Fix by adding a null-check
p=Florian Queze <f.qu@queze.net>
r=mano
This commit is contained in:
asqueella%gmail.com 2007-02-20 20:36:53 +00:00
parent 57f0bcd657
commit 97dd03bb54

View File

@ -108,7 +108,10 @@ function getPings(elem)
var docURI = ios.newURI(doc.documentURI, doc.characterSet, null);
// The URL strings returned by elem.ping are absolute URLs.
var pings = elem.ping.split(" ");
var pings = elem.ping;
if (!pings)
return result;
pings = pings.split(" ");
for (var i = 0; i < pings.length; ++i) {
if (requireSameHost) {
var uri = ios.newURI(pings[i], doc.characterSet, null);