When evaluating naked JsObject fields wrap them in an ExpWrapper.

git-svn-id: http://yate.null.ro/svn/yate/trunk@5867 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2014-07-11 16:24:15 +00:00
parent ac2d9f4a88
commit 9599d6dbb7
1 changed files with 7 additions and 2 deletions

View File

@ -341,8 +341,13 @@ bool JsObject::runField(ObjList& stack, const ExpOperation& oper, GenObject* con
if (w)
ExpEvaluator::pushOne(stack,w->clone(oper.name()));
else {
ExpOperation* o = YOBJECT(ExpOperation,param);
ExpEvaluator::pushOne(stack,o ? new ExpOperation(*o,oper.name(),false) : new ExpOperation(*param,oper.name(),true));
JsObject* jso = YOBJECT(JsObject,param);
if (jso && jso->ref())
ExpEvaluator::pushOne(stack,new ExpWrapper(jso,oper.name()));
else {
ExpOperation* o = YOBJECT(ExpOperation,param);
ExpEvaluator::pushOne(stack,o ? new ExpOperation(*o,oper.name(),false) : new ExpOperation(*param,oper.name(),true));
}
}
}
}