Fix some issues found by static analysis (clang-analyzer and cppcheck).

This was SVN commit r16801.
This commit is contained in:
leper
2015-06-21 18:46:31 +00:00
parent caa8f51c2e
commit 5a0b9b0e70
3 changed files with 4 additions and 8 deletions
+2 -4
View File
@@ -333,8 +333,6 @@ void* ScriptRuntime::jshook_function(JSContext* cx, JSAbstractFramePtr fp, bool
void ScriptRuntime::PrepareContextsForIncrementalGC()
{
for (std::list<JSContext*>::iterator itr = m_Contexts.begin(); itr != m_Contexts.end(); itr++)
{
JS::PrepareZoneForGC(js::GetCompartmentZone(js::GetContextCompartment(*itr)));
}
for (JSContext* const& ctx : m_Contexts)
JS::PrepareZoneForGC(js::GetCompartmentZone(js::GetContextCompartment(ctx)));
}