Bug 301491 [@ js_LinkFunctionObject]

r=brendan sr=shaver a=brendan
This commit is contained in:
timeless%mozdev.org 2005-07-28 17:18:09 +00:00
parent 2ea0a169a6
commit 07c3882b90

View File

@ -1890,6 +1890,10 @@ nsXPCComponents_Utils::LookupMethod()
if(!member->GetValue(inner_cc, iface, &funval))
return NS_ERROR_XPC_BAD_CONVERT_JS;
// Make sure the function we're cloning doesn't go away while
// we're cloning it.
AUTO_MARK_JSVAL(inner_cc, funval);
// clone a function we can use for this object
JSObject* funobj = xpc_CloneJSFunction(inner_cc, JSVAL_TO_OBJECT(funval),
wrapper->GetFlatJSObject());