Back this out for now to sort out what happens when we're called from C++, not from Javascript.

This commit is contained in:
mrbkap@gmail.com 2007-05-23 17:50:50 -07:00
parent 22a9fef741
commit 7985ba2c50

View File

@ -231,15 +231,13 @@ WrapFunction(JSContext* cx, JSObject* funobj, jsval *rval)
// function's parent will be the original function and that's how we
// get the right thing to call when this function is called.
JSFunction *funWrapper =
::JS_NewFunction(cx, XPC_NW_FunctionWrapper, 0, 0, nsnull,
::JS_NewFunction(cx, XPC_NW_FunctionWrapper, 0, 0, funobj,
"XPCNativeWrapper function wrapper");
if (!funWrapper) {
return JS_FALSE;
}
JSObject* funWrapperObj = ::JS_GetFunctionObject(funWrapper);
::JS_SetParent(cx, funWrapperObj, funobj);
*rval = OBJECT_TO_JSVAL(funWrapperObj);
*rval = OBJECT_TO_JSVAL(::JS_GetFunctionObject(funWrapper));
return JS_TRUE;
}