Bug 868783 - Fix rooting hazards in nsXBLSerialize.cpp; r=till

This commit is contained in:
Ehsan Akhgari 2013-05-04 19:48:13 -04:00
parent f52ea50f54
commit d3a06e40f8

View File

@ -16,7 +16,8 @@ XBL_SerializeFunction(nsIScriptContext* aContext,
JSObject* aFunctionObject)
{
AutoPushJSContext cx(aContext->GetNativeContext());
return nsContentUtils::XPConnect()->WriteFunction(aStream, cx, aFunctionObject);
JS::RootedObject function(cx, aFunctionObject);
return nsContentUtils::XPConnect()->WriteFunction(aStream, cx, function);
}
nsresult