Loop without a reachable exit
high
A while/for/do loop whose condition is a constant truthy value and whose body contains no break, return or throw. It can never terminate.
Why it matters
while (true) or for (;;) without break or return inside is the static form of
PAC-E007. It is usually a leftover from debugging or a mis-edited retry loop. Unlike most
PAC bugs this one does not fail open; it stalls proxy resolution for the whole browser.
How to fix
Delete the loop or add a terminating condition; PAC logic rarely needs loops at all.
Examples
Bad
function FindProxyForURL(url, host) {
while (true) {
host = host.toLowerCase();
}
return "DIRECT";
}
Open bad example in checkerGood
function FindProxyForURL(url, host) {
host = host.toLowerCase();
return "DIRECT";
}
Open good example in checker