mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 410929 - Bad C++isms in js/src, r=crowder
This commit is contained in:
parent
44c5efe626
commit
3a92106058
@ -1232,7 +1232,8 @@ array_sort(JSContext *cx, uintN argc, jsval *vp)
|
||||
} while (i != 0);
|
||||
|
||||
JS_ASSERT(tvr.u.array == vec);
|
||||
vec = JS_realloc(cx, vec, 4 * (size_t) newlen * sizeof(jsval));
|
||||
vec = (jsval *) JS_realloc(cx, vec,
|
||||
4 * (size_t) newlen * sizeof(jsval));
|
||||
if (!vec) {
|
||||
vec = tvr.u.array;
|
||||
ok = JS_FALSE;
|
||||
|
@ -3275,7 +3275,7 @@ EmitDestructuringDecl(JSContext *cx, JSCodeGenerator *cg, JSOp prologOp,
|
||||
JSOp decltype;
|
||||
|
||||
JS_ASSERT(pn->pn_type == TOK_NAME);
|
||||
decltype = (prologOp == JSOP_NOP) ? LET_DECL : VAR_DECL;
|
||||
decltype = (prologOp == JSOP_NOP) ? (JSOp) LET_DECL : (JSOp) VAR_DECL;
|
||||
if (!BindNameToSlot(cx, cg, pn, decltype))
|
||||
return JS_FALSE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user