While with spidermonkey 1.7 this object was working as expected in functions, with 1.8.5 always defaults to global object.
I am evaluating scripts to specific object and i expect this to be that object in functions as it did with 1.7.
for example
function dummy()
{
alert("This: "+this);
}
with 1.7 will display "This: [object doc]"
1.8.5 will "This: [object global]"
Spidermonkey api call is made like:
JS_EvaluateUCScript(Ctx, jsobj, Code, Length(Code), nil, 0, nil)
where jsobj is an object other than global object