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

@@ -153,7 +153,7 @@ void initErrorObject(JS2Metadata *meta)
PrototypeFunction *pf = &errorProtos[0];
while (pf->name) {
SimpleInstance *fInst = new SimpleInstance(meta->functionClass);
fInst->fWrap = new FunctionWrapper(true, new ParameterFrame(JS2VAL_INACCESSIBLE, true), pf->code);
fInst->fWrap = new FunctionWrapper(true, new ParameterFrame(JS2VAL_INACCESSIBLE, true), pf->code, meta->env);
InstanceMember *m = new InstanceMethod(fInst);
meta->defineInstanceMember(meta->errorClass, &meta->cxt, &meta->world.identifiers[pf->name], &publicNamespaceList, Attribute::NoOverride, false, ReadWriteAccess, m, 0);