@@ -167,7 +167,8 @@ bool RequestOrResponse::mark_body_used(JSContext *cx, JS::HandleObject obj) {
167
167
// it's a disturbed ReadableStream. To improve error reporting, we clear
168
168
// the current exception and throw a better one.
169
169
JS_ClearPendingException (cx);
170
- JS_ReportErrorNumberLatin1 (cx, GetErrorMessage, nullptr , JSMSG_READABLE_STREAM_LOCKED_OR_DISTRUBED);
170
+ JS_ReportErrorNumberLatin1 (cx, GetErrorMessage, nullptr ,
171
+ JSMSG_READABLE_STREAM_LOCKED_OR_DISTRUBED);
171
172
return false ;
172
173
}
173
174
}
@@ -258,7 +259,8 @@ bool RequestOrResponse::extract_body(JSContext *cx, JS::HandleObject self,
258
259
259
260
if (body_obj && JS::IsReadableStream (body_obj)) {
260
261
if (RequestOrResponse::body_unusable (cx, body_obj)) {
261
- JS_ReportErrorNumberLatin1 (cx, GetErrorMessage, nullptr , JSMSG_READABLE_STREAM_LOCKED_OR_DISTRUBED);
262
+ JS_ReportErrorNumberLatin1 (cx, GetErrorMessage, nullptr ,
263
+ JSMSG_READABLE_STREAM_LOCKED_OR_DISTRUBED);
262
264
return false ;
263
265
}
264
266
@@ -1367,7 +1369,8 @@ bool Request::clone(JSContext *cx, unsigned argc, JS::Value *vp) {
1367
1369
}
1368
1370
body_stream.set (&body1_val.toObject ());
1369
1371
if (RequestOrResponse::body_unusable (cx, body_stream)) {
1370
- JS_ReportErrorNumberLatin1 (cx, GetErrorMessage, nullptr , JSMSG_READABLE_STREAM_LOCKED_OR_DISTRUBED);
1372
+ JS_ReportErrorNumberLatin1 (cx, GetErrorMessage, nullptr ,
1373
+ JSMSG_READABLE_STREAM_LOCKED_OR_DISTRUBED);
1371
1374
return false ;
1372
1375
}
1373
1376
@@ -2423,7 +2426,8 @@ bool Response::redirect(JSContext *cx, unsigned argc, JS::Value *vp) {
2423
2426
if (!builtins::Headers::maybe_add (cx, headers, " location" , url_str.begin ())) {
2424
2427
return false ;
2425
2428
}
2426
- JS::SetReservedSlot (headers, static_cast <uint32_t >(builtins::Headers::Slots::Immutable), JS::TrueValue ());
2429
+ JS::SetReservedSlot (headers, static_cast <uint32_t >(builtins::Headers::Slots::Immutable),
2430
+ JS::TrueValue ());
2427
2431
JS::SetReservedSlot (response, static_cast <uint32_t >(Slots::Headers), JS::ObjectValue (*headers));
2428
2432
JS::SetReservedSlot (response, static_cast <uint32_t >(Slots::Redirected), JS::FalseValue ());
2429
2433
// 8. Return responseObject.
@@ -2653,7 +2657,8 @@ bool Response::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {
2653
2657
if (!statusText_val.isUndefined ()) {
2654
2658
auto status_text_result = GlobalProperties::convertJSValueToByteString (cx, statusText_val);
2655
2659
if (status_text_result.isErr ()) {
2656
- JS_ReportErrorNumberASCII (cx, GetErrorMessage, nullptr , JSMSG_RESPONSE_CONSTRUCTOR_INVALID_STATUS_TEXT);
2660
+ JS_ReportErrorNumberASCII (cx, GetErrorMessage, nullptr ,
2661
+ JSMSG_RESPONSE_CONSTRUCTOR_INVALID_STATUS_TEXT);
2657
2662
return false ;
2658
2663
}
2659
2664
auto status_text = status_text_result.unwrap ();
@@ -2674,7 +2679,8 @@ bool Response::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {
2674
2679
});
2675
2680
2676
2681
if (it != status_text.end ()) {
2677
- JS_ReportErrorNumberASCII (cx, GetErrorMessage, nullptr , JSMSG_RESPONSE_CONSTRUCTOR_INVALID_STATUS_TEXT);
2682
+ JS_ReportErrorNumberASCII (cx, GetErrorMessage, nullptr ,
2683
+ JSMSG_RESPONSE_CONSTRUCTOR_INVALID_STATUS_TEXT);
2678
2684
return false ;
2679
2685
}
2680
2686
statusText = JS_NewStringCopyZ (cx, status_text.c_str ());
@@ -2689,7 +2695,8 @@ bool Response::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {
2689
2695
// 1. If `init`["status"] is not in the range 200 to 599, inclusive, then
2690
2696
// `throw` a ``RangeError``.
2691
2697
if (status < 200 || status > 599 ) {
2692
- JS_ReportErrorNumberASCII (cx, GetErrorMessage, nullptr , JSMSG_RESPONSE_CONSTRUCTOR_INVALID_STATUS, status);
2698
+ JS_ReportErrorNumberASCII (cx, GetErrorMessage, nullptr ,
2699
+ JSMSG_RESPONSE_CONSTRUCTOR_INVALID_STATUS, status);
2693
2700
return false ;
2694
2701
}
2695
2702
@@ -2775,7 +2782,8 @@ bool Response::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {
2775
2782
// 1. If `init`["status"] is a `null body status`, then `throw` a
2776
2783
// ``TypeError``.
2777
2784
if (status == 204 || status == 205 || status == 304 ) {
2778
- JS_ReportErrorNumberLatin1 (cx, GetErrorMessage, nullptr , JSMSG_RESPONSE_CONSTRUCTOR_BODY_WITH_NULL_BODY_STATUS);
2785
+ JS_ReportErrorNumberLatin1 (cx, GetErrorMessage, nullptr ,
2786
+ JSMSG_RESPONSE_CONSTRUCTOR_BODY_WITH_NULL_BODY_STATUS);
2779
2787
return false ;
2780
2788
}
2781
2789
0 commit comments