Fixed passing wrong environment to function call.

git-svn-id: svn://10.0.0.236/trunk@139296 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rogerl%netscape.com
2003-03-11 23:46:09 +00:00
parent 7307191534
commit d9a6dcdb17
10 changed files with 169 additions and 148 deletions

View File

@@ -341,7 +341,7 @@ void initMathObject(JS2Metadata *meta)
FunctionData *pf = &prototypeFunctions[0];
while (pf->name) {
SimpleInstance *callInst = new SimpleInstance(meta->functionClass);
callInst->fWrap = new FunctionWrapper(true, new ParameterFrame(JS2VAL_INACCESSIBLE, true), pf->code);
callInst->fWrap = new FunctionWrapper(true, new ParameterFrame(JS2VAL_INACCESSIBLE, true), pf->code, meta->env);
Variable *v = new Variable(meta->functionClass, OBJECT_TO_JS2VAL(callInst), true);
meta->defineLocalMember(meta->env, &meta->world.identifiers[pf->name], &publicNamespaceList, Attribute::NoOverride, false, ReadWriteAccess, v, 0);