Add missing JSAutoRequest calls. (hopefully all of them have been spotted now)

Patch by echotangoecho, refs #4053

This was SVN commit r18730.
This commit is contained in:
Itms
2016-09-18 09:34:45 +00:00
parent 184d64cdc8
commit caef42084d
8 changed files with 40 additions and 9 deletions
@@ -465,7 +465,10 @@ u32 CBinarySerializerScriptImpl::GetScriptBackrefTag(JS::HandleObject obj)
if (m_ScriptBackrefs.find(obj, tag))
return tag;
m_ScriptBackrefs.add(m_ScriptInterface.GetContext(), obj, m_ScriptBackrefsNext);
JSContext* cx = m_ScriptInterface.GetContext();
JSAutoRequest rq(cx);
m_ScriptBackrefs.add(cx, obj, m_ScriptBackrefsNext);
m_ScriptBackrefsNext++;
// Return a non-tag number so callers know they need to serialize the object