Bug 1411415.

This commit is contained in:
wolfbeast 2018-04-29 13:39:11 +02:00 committed by Roy Tam
commit 66bf4fa8f9
10 changed files with 91 additions and 33 deletions

View file

@ -1785,9 +1785,12 @@ CallMethodHelper::ConvertIndependentParam(uint8_t i)
// indirectly, regardless of in/out-ness.
if (type_tag == nsXPTType::T_JSVAL) {
// Root the value.
dp->val.j.setUndefined();
if (!js::AddRawValueRoot(mCallContext, &dp->val.j, "XPCWrappedNative::CallMethod param"))
dp->val.j.asValueRef().setUndefined();
if (!js::AddRawValueRoot(mCallContext, &dp->val.j.asValueRef(),
"XPCWrappedNative::CallMethod param"))
{
return false;
}
}
// Flag cleanup for anything that isn't self-contained.