}
if (!JS_IsUndefined(value)) {
- if (JS_ToInt64(cx, (int64_t *) &http->buffer_size, value) < 0) {
- JS_FreeValue(cx, value);
+ rc = JS_ToInt64(cx, (int64_t *) &http->buffer_size, value);
+ JS_FreeValue(cx, value);
+
+ if (rc < 0) {
goto fail;
}
}
}
if (!JS_IsUndefined(value)) {
- if (JS_ToInt64(cx, (int64_t *) &http->max_response_body_size,
- value) < 0)
- {
- JS_FreeValue(cx, value);
+ rc = JS_ToInt64(cx, (int64_t *) &http->max_response_body_size,
+ value);
+ JS_FreeValue(cx, value);
+
+ if (rc < 0) {
goto fail;
}
}
if (!JS_IsUndefined(value)) {
http->ssl_verify = JS_ToBool(cx, value);
+ JS_FreeValue(cx, value);
}
#endif
}