Fix a potential reference issue in JS arrays.

Found with SA.
This commit is contained in:
Pale Moon
2017-10-04 17:42:35 +02:00
committed by Roy Tam
parent f24f4a4cd0
commit dbeb71fc23
+1 -1
View File
@@ -980,7 +980,7 @@ ArrayJoinKernel(JSContext* cx, SeparatorOp sepOp, HandleObject obj, uint32_t len
if (!CheckForInterrupt(cx))
return false;
const Value& elem = obj->as<ArrayObject>().getDenseElement(i);
Value elem = obj->as<ArrayObject>().getDenseElement(i);
if (elem.isString()) {
if (!sb.append(elem.toString()))