Skip to content

Commit 040ea8b

Browse files
authored
fix: Remove accidentally commited debug messages which write to stderr (#838)
1 parent 68ddacf commit 040ea8b

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

runtime/js-compute-runtime/js-compute-builtins.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,58 +1221,41 @@ bool print_stack(JSContext *cx, FILE *fp) {
12211221
// TODO: Support the other possible inputs to Body.
12221222
JS::Result<std::tuple<JS::UniqueChars, size_t>> convertBodyInit(JSContext *cx,
12231223
JS::HandleValue bodyInit) {
1224-
fprintf(stderr, "a");
12251224
JS::RootedObject bodyObj(cx, bodyInit.isObject() ? &bodyInit.toObject() : nullptr);
1226-
fprintf(stderr, "b");
12271225
mozilla::Maybe<JS::AutoCheckCannotGC> maybeNoGC;
12281226
JS::UniqueChars buf;
12291227
size_t length;
12301228

12311229
if (bodyObj && JS_IsArrayBufferViewObject(bodyObj)) {
1232-
fprintf(stderr, "ca");
12331230
// `maybeNoGC` needs to be populated for the lifetime of `buf` because
12341231
// short typed arrays have inline data which can move on GC, so assert
12351232
// that no GC happens. (Which it doesn't, because we're not allocating
12361233
// before `buf` goes out of scope.)
12371234
maybeNoGC.emplace(cx);
12381235
JS::AutoCheckCannotGC &noGC = maybeNoGC.ref();
1239-
fprintf(stderr, "da");
12401236
bool is_shared;
12411237
length = JS_GetArrayBufferViewByteLength(bodyObj);
1242-
fprintf(stderr, "ea");
12431238
buf = JS::UniqueChars(
12441239
reinterpret_cast<char *>(JS_GetArrayBufferViewData(bodyObj, &is_shared, noGC)));
1245-
fprintf(stderr, "fa");
12461240
MOZ_ASSERT(!is_shared);
12471241
} else if (bodyObj && JS::IsArrayBufferObject(bodyObj)) {
1248-
fprintf(stderr, "cb");
12491242
bool is_shared;
12501243
uint8_t *bytes;
12511244
JS::GetArrayBufferLengthAndData(bodyObj, &length, &is_shared, &bytes);
1252-
fprintf(stderr, "db");
12531245
MOZ_ASSERT(!is_shared);
12541246
buf.reset(reinterpret_cast<char *>(bytes));
1255-
fprintf(stderr, "eb");
12561247
} else if (bodyObj && builtins::URLSearchParams::is_instance(bodyObj)) {
1257-
fprintf(stderr, "dc");
12581248
jsurl::SpecSlice slice = builtins::URLSearchParams::serialize(cx, bodyObj);
1259-
fprintf(stderr, "ec");
12601249
buf = JS::UniqueChars(reinterpret_cast<char *>(const_cast<uint8_t *>(slice.data)));
1261-
fprintf(stderr, "fc");
12621250
length = slice.len;
12631251
} else {
1264-
fprintf(stderr, "dd");
12651252
// Convert into a String following https://tc39.es/ecma262/#sec-tostring
12661253
auto str = core::encode(cx, bodyInit);
1267-
fprintf(stderr, "ed");
12681254
buf = std::move(str.ptr);
1269-
fprintf(stderr, "fd");
12701255
length = str.len;
12711256
if (!buf) {
1272-
fprintf(stderr, "gd");
12731257
return JS::Result<std::tuple<JS::UniqueChars, size_t>>(JS::Error());
12741258
}
12751259
}
1276-
fprintf(stderr, "h");
12771260
return JS::Result<std::tuple<JS::UniqueChars, size_t>>(std::make_tuple(std::move(buf), length));
12781261
}

0 commit comments

Comments
 (0)