Skip to content

Commit ad3ee98

Browse files
Jake ChampionJakeChampion
authored andcommitted
be explicit about how long maybeNoGC needs to be populated for
1 parent 18ab8d5 commit ad3ee98

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

c-dependencies/js-compute-runtime/builtins/object-store.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ bool put(JSContext *cx, unsigned argc, JS::Value *vp) {
257257
size_t length;
258258

259259
if (body_obj && JS_IsArrayBufferViewObject(body_obj)) {
260-
// Short typed arrays have inline data which can move on GC, so assert
260+
// `maybeNoGC` needs to be populated for the lifetime of `buf` because
261+
// short typed arrays have inline data which can move on GC, so assert
261262
// that no GC happens. (Which it doesn't, because we're not allocating
262263
// before `buf` goes out of scope.)
263264
maybeNoGC.emplace(cx);

0 commit comments

Comments
 (0)