Generalized checkPrivilege
foreach stackFrame{ // from new to old
if (class in stackFrame can’t access target by policy)
throw ForbiddenException;
if (stackFrame has privilege for target)
if (stackFrame has disabled privilege for target)
throw ForbiddenException;
// we are now off the end of the stack
if Netscape throw ForbiddenException
else return; // MSIE and Java 2 allow access