* Limit maximal loop count for Macro.resolveHandler() lookup.
Fixes symptoms of bug 543. <http://helma.org/bugs/show_bug.cgi?id=543>
This commit is contained in:
parent
5cd2021502
commit
54617d09c1
1 changed files with 4 additions and 2 deletions
|
@ -1099,8 +1099,10 @@ public final class Skin {
|
||||||
// the handler object is not what we want
|
// the handler object is not what we want
|
||||||
Object obj = thisObject;
|
Object obj = thisObject;
|
||||||
|
|
||||||
// walk down parent chain to find handler object
|
// walk down parent chain to find handler object,
|
||||||
while (obj != null) {
|
// limiting to 50 passes to avoid infinite loops
|
||||||
|
int maxloop = 50;
|
||||||
|
while (obj != null && maxloop-- > 0) {
|
||||||
Prototype proto = app.getPrototype(obj);
|
Prototype proto = app.getPrototype(obj);
|
||||||
|
|
||||||
if ((proto != null) && proto.isInstanceOf(handlerName)) {
|
if ((proto != null) && proto.isInstanceOf(handlerName)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue