mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
[INFER] Fixes for botched merge.
This commit is contained in:
parent
4374d1fbe2
commit
637c0ef693
@ -4118,8 +4118,10 @@ JS_NewArrayObject(JSContext *cx, jsint length, jsval *vector)
|
||||
assertSameCompartment(cx, JSValueArray(vector, vector ? (jsuint)length : 0));
|
||||
|
||||
#ifdef DEBUG
|
||||
for (int i = 0; i < length; i++)
|
||||
JS_ASSERT(!Valueify(vector[i]).isMagic(JS_ARRAY_HOLE));
|
||||
if (vector) {
|
||||
for (int i = 0; i < length; i++)
|
||||
JS_ASSERT(!Valueify(vector[i]).isMagic(JS_ARRAY_HOLE));
|
||||
}
|
||||
#endif
|
||||
|
||||
return NewDenseCopiedArray(cx, (jsuint)length, Valueify(vector));
|
||||
|
@ -3475,10 +3475,13 @@ NewDenseCopiedArray(JSContext *cx, uintN length, Value *vp, JSObject *proto)
|
||||
JSObject* obj = NewArray<true>(cx, length, proto);
|
||||
JS_ASSERT(obj->getDenseArrayCapacity() >= length);
|
||||
|
||||
if (vp)
|
||||
if (vp) {
|
||||
memcpy(obj->getDenseArrayElements(), vp, length * sizeof(Value));
|
||||
obj->setDenseArrayInitializedLength(length);
|
||||
} else {
|
||||
obj->setDenseArrayInitializedLength(0);
|
||||
}
|
||||
|
||||
obj->setDenseArrayInitializedLength(length);
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
@ -2975,6 +2975,7 @@ js_CreateThisFromTrace(JSContext *cx, Class *clasp, JSObject *ctor)
|
||||
* A primitive value in .prototype means to use Object.prototype
|
||||
* for proto. See ES5 13.2.2 step 7.
|
||||
*/
|
||||
proto = objProto;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user