diff --git a/js2/src/js2metadata.h b/js2/src/js2metadata.h index f3b4bd871131..a571f8e9222a 100644 --- a/js2/src/js2metadata.h +++ b/js2/src/js2metadata.h @@ -258,7 +258,7 @@ public: } ~RootKeeper() { JS2Object::removeRoot(ri); delete file; } #else - RootKeeper(void *p) :{ ri = JS2Object::addRoot(p); } + RootKeeper(void *p) { ri = JS2Object::addRoot(p); } ~RootKeeper() { JS2Object::removeRoot(ri); } #endif diff --git a/js2/src/js2op_invocation.cpp b/js2/src/js2op_invocation.cpp index 49088fca46c0..378e97801430 100644 --- a/js2/src/js2op_invocation.cpp +++ b/js2/src/js2op_invocation.cpp @@ -126,12 +126,13 @@ } uint32 length = getLength(meta, fObj); if (fWrap->code) { // native code + uint16 argc = argCount; while (argCount < length) { push(JS2VAL_UNDEFINED); argCount++; } jsr(phase, NULL, base(argCount + 2) - execStack, JS2VAL_VOID, fWrap->env); - a = fWrap->code(meta, a, base(argCount), argCount); + a = fWrap->code(meta, a, base(argCount), argc); rts(); push(a); }