fixing bustage.

This commit is contained in:
dwitte@stanford.edu 2007-07-26 01:55:53 -07:00
parent 2b1c38288d
commit bd219dab6c

View File

@ -141,12 +141,6 @@ nsEffectiveTLDService::GetEffectiveTLDLength(const nsACString &aHostname,
const char *nextDot = strchr(currDomain, '.');
const char *end = currDomain + normHostname.Length();
while (1) {
if (!nextDot) {
// we've hit the top domain level; return it by default.
*effTLDLength = end - currDomain;
break;
}
nsDomainEntry *entry = mHash.GetEntry(currDomain);
if (entry) {
if (entry->IsWild() && prevDomain) {
@ -166,6 +160,12 @@ nsEffectiveTLDService::GetEffectiveTLDLength(const nsACString &aHostname,
}
}
if (!nextDot) {
// we've hit the top domain level; return it by default.
*effTLDLength = end - currDomain;
break;
}
prevDomain = currDomain;
currDomain = nextDot + 1;
nextDot = strchr(currDomain, '.');