mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Back this out for now to sort out what happens when we're called from C++, not from Javascript.
This commit is contained in:
parent
22a9fef741
commit
7985ba2c50
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user