Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions quickjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -28656,7 +28656,8 @@ static __exception int js_parse_for_in_of(JSParseState *s, int label_name,
int chunk_size = pos_expr - pos_next;
int offset = bc->size - pos_next;
int i;
dbuf_claim(bc, chunk_size);
if (dbuf_claim(bc, chunk_size))
return -1;
dbuf_put(bc, bc->buf + pos_next, chunk_size);
memset(bc->buf + pos_next, OP_nop, chunk_size);
/* `next` part ends with a goto */
Expand Down Expand Up @@ -29062,7 +29063,8 @@ static __exception int js_parse_statement_or_decl(JSParseState *s,
int chunk_size = pos_body - pos_cont;
int offset = bc->size - pos_cont;
int i;
dbuf_claim(bc, chunk_size);
if (dbuf_claim(bc, chunk_size))
goto fail;
dbuf_put(bc, bc->buf + pos_cont, chunk_size);
memset(bc->buf + pos_cont, OP_nop, chunk_size);
/* increment part ends with a goto */
Expand Down Expand Up @@ -37990,11 +37992,14 @@ static int JS_WriteObjectRec(BCWriterState *s, JSValueConst obj)
case JS_TAG_STRING_ROPE:
{
JSValue str;
int ret;
str = JS_ToString(s->ctx, obj);
if (JS_IsException(str))
goto fail;
JS_WriteObjectRec(s, str);
ret = JS_WriteObjectRec(s, str);
JS_FreeValue(s->ctx, str);
if (ret)
goto fail;
}
break;
case JS_TAG_FUNCTION_BYTECODE:
Expand Down
Loading