Assertion failed: controller.[[queue]] is empty.

==== JS stack trace =========================================

Security context: 0x1c5f2d2c0751 <String[29]: http://web-platform.test:8001>
    2: logStackTrace [native prologue.js:1] [bytecode=0x2ba1af50ae29 offset=4](this=0xcad8bf2da39 <Object map = 0x246fed111f01>#0#)
    4: TEMP_ASSERT(aka TEMP_ASSERT) [native WritableStream.js:112] [bytecode=0x28126184b401 offset=55](this=0xddf35402311 <undefined>,predicate=0xddf35402421 <false>,message=0x2812618573e1 <String[30]: controller.[[queue]] is empty.>)
    6: WritableStreamDefaultControllerProcessClose(aka WritableStreamDefaultControllerProcessClose) [native WritableStream.js:633] [bytecode=0x2812618576f1 offset=169](this=0xddf35402311 <undefined>,controller=0xdde63929f81 <WritableStreamDefaultController map = 0x246fed12a949>#1#)
    8: WritableStreamDefaultControllerAdvanceQueueIfNeeded(aka WritableStreamDefaultControllerAdvanceQueueIfNeeded) [native WritableStream.js:616] [bytecode=0x28126184ecc1 offset=206](this=0xddf35402311 <undefined>,controller=0xdde63929f81 <WritableStreamDefaultController map = 0x246fed12a949>#1#)
   10: onFulfilled(aka onFulfilled) [native WritableStream.js:532] [bytecode=0x281261850a29 offset=58](this=0xddf35402311 <undefined>)
   11: arguments adaptor frame: 1->0
   12: /* anonymous */(aka /* anonymous */)(this=0xddf35402311 <undefined>)

==== Details ================================================

[2]: logStackTrace [native prologue.js:1] [bytecode=0x2ba1af50ae29 offset=4](this=0xcad8bf2da39 <Object map = 0x246fed111f01>#0#) {
  // expression stack (top to bottom)
  [00] : 0xcad8bf2ddc9 <JSFunction logStackTrace (sfi = 0xddf35409871)>#2#
--------- s o u r c e   c o d e ---------
function logStackTrace(){\x0a%DebugTrace();\x0a}
-----------------------------------------
}

[4]: TEMP_ASSERT(aka TEMP_ASSERT) [native WritableStream.js:112] [bytecode=0x28126184b401 offset=55](this=0xddf35402311 <undefined>,predicate=0xddf35402421 <false>,message=0x2812618573e1 <String[30]: controller.[[queue]] is empty.>) {
  // stack-allocated locals
  var /* anonymous */ = 0xddf35402311 <undefined>
  var WritableStreamInternalError = 0xddf35402311 <undefined>
  // expression stack (top to bottom)
  [07] : 0xddf35402311 <undefined>
  [06] : 0xddf35402311 <undefined>
  [05] : 0xdde6392b771 <String[49]\: Assertion failed: controller.[[queue]] is empty.\n>
  [04] : 0xcad8bf2da39 <Object map = 0x246fed111f01>#0#
  [03] : 0xcad8bf2ddc9 <JSFunction logStackTrace (sfi = 0xddf35409871)>#2#
  [02] : 0xddf35402351 <the_hole>
--------- s o u r c e   c o d e ---------
function TEMP_ASSERT(predicate, message) {\x0a    if (predicate) {\x0a      return;\x0a    }\x0a    v8.log(`Assertion failed: ${message}\n`);\x0a    v8.logStackTrace();\x0a    class WritableStreamInternalError extends Error {\x0a      constructor(message) {\x0a        super(message);\x0a      }\x0a    }\x0a    throw new WritableStreamInternalError(mes...

-----------------------------------------
}

[6]: WritableStreamDefaultControllerProcessClose(aka WritableStreamDefaultControllerProcessClose) [native WritableStream.js:633] [bytecode=0x2812618576f1 offset=169](this=0xddf35402311 <undefined>,controller=0xdde63929f81 <WritableStreamDefaultController map = 0x246fed12a949>#1#) {
  // stack-allocated locals
  var sinkClosePromise = 0xddf35402351 <the_hole>
  // heap-allocated locals
  var controller = 0xdde63929f81 <WritableStreamDefaultController map = 0x246fed12a949>#1#
  var stream = 0xdde63929e21 <WritableStream map = 0x246fed129c91>#3#
  // expression stack (top to bottom)
  [07] : 0xddf35402311 <undefined>
  [06] : 0xddf35402311 <undefined>
  [05] : 0x2812618573e1 <String[30]: controller.[[queue]] is empty.>
  [04] : 0xddf35402421 <false>
  [03] : 0xddf35402311 <undefined>
  [02] : 0xd7970426851 <JSFunction TEMP_ASSERT (sfi = 0x2fd12db60391)>#4#
  [01] : 0xd7970436be9 <FixedArray[105]>#5#
--------- s o u r c e   c o d e ---------
function WritableStreamDefaultControllerProcessClose(controller) {\x0a    const stream = controller[_controlledWritableStream];\x0a    TEMP_ASSERT(stream[_state] === CLOSING,\x0a                'stream.[[state]] is "closing".');\x0a    DequeueValueForController(controller);\x0a    TEMP_ASSERT(controller[_queue].length === 0,\x0a                'controller.[[queue]] is...

-----------------------------------------
}

[8]: WritableStreamDefaultControllerAdvanceQueueIfNeeded(aka WritableStreamDefaultControllerAdvanceQueueIfNeeded) [native WritableStream.js:616] [bytecode=0x28126184ecc1 offset=206](this=0xddf35402311 <undefined>,controller=0xdde63929f81 <WritableStreamDefaultController map = 0x246fed12a949>#1#) {
  // stack-allocated locals
  var state = 1
  var writeRecord = 0xddf35425319 <String[5]: close>
  // expression stack (top to bottom)
  [05] : 0xddf35402311 <undefined>
  [04] : 0xdde6392a081 <SimpleQueue map = 0x246fed129769>#6#
  [03] : 0xddf35402311 <undefined>
  [02] : 0xdde63917949 <JSFunction WritableStreamDefaultControllerProcessClose (sfi = 0x2fd12db61b21)>#7#
--------- s o u r c e   c o d e ---------
function WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller) {\x0a    const state = controller[_controlledWritableStream][_state];\x0a    if (state === CLOSED || state === ERRORED) {\x0a      return;\x0a    }\x0a    if (!getDefaultControllerStartedFlag(controller)) {\x0a      return;\x0a    }\x0a    if (getDefaultControllerWritingFlag(controller)) {\x0a      return;\x0a    }\x0a...

-----------------------------------------
}

[10]: onFulfilled(aka onFulfilled) [native WritableStream.js:532] [bytecode=0x281261850a29 offset=58](this=0xddf35402311 <undefined>) {
  // expression stack (top to bottom)
  [03] : 0xddf354023b1 <true>
  [02] : 0xdde63929f81 <WritableStreamDefaultController map = 0x246fed12a949>#1#
  [01] : 0xddf35402311 <undefined>
  [00] : 0xd7970426f09 <JSFunction WritableStreamDefaultControllerAdvanceQueueIfNeeded (sfi = 0x2fd12db61981)>#8#
--------- s o u r c e   c o d e ---------
function onFulfilled() => {\x0a        setDefaultControllerStartedFlag(controller, true);\x0a        WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller);\x0a      }
-----------------------------------------
}

[11]: arguments adaptor frame: 1->0 {
  // actual arguments
  [00] : 0xddf35402311 <undefined>  // not passed to callee
}

[12]: /* anonymous */(aka /* anonymous */)(this=0xddf35402311 <undefined>) {
// optimized frame
--------- s o u r c e   c o d e ---------
<No Source>
-----------------------------------------
}
==== Key         ============================================

 #0# 0xcad8bf2da39: 0xcad8bf2da39 <Object map = 0x246fed111f01>
 #1# 0xdde63929f81: 0xdde63929f81 <WritableStreamDefaultController map = 0x246fed12a949>
 #2# 0xcad8bf2ddc9: 0xcad8bf2ddc9 <JSFunction logStackTrace (sfi = 0xddf35409871)>
 #3# 0xdde63929e21: 0xdde63929e21 <WritableStream map = 0x246fed129c91>
        controller: 0xdde63929f81 <WritableStreamDefaultController map = 0x246fed12a949>#1#
            events: 0xdde6392a471 <JSArray[0]>#9#
 #4# 0xd7970426851: 0xd7970426851 <JSFunction TEMP_ASSERT (sfi = 0x2fd12db60391)>
 #5# 0xd7970436be9: 0xd7970436be9 <FixedArray[105]>
                 0: 0xdde63917421 <JSFunction (sfi = 0x2fd12db5f9d1)>#10#
                 1: 0xcad8bf18ea9 <FixedArray[265]>#11#
                 3: 0xcad8bf18ea9 <FixedArray[265]>#11#
                 4: 0xcad8bf2da39 <Object map = 0x246fed111f01>#0#
                 5: 0xcad8bf2dfc1 <Object map = 0x246fed118469>#12#
                 6: 0xcad8bf51079 <Symbol: [[pendingWriteRequest]]>#13#
                 7: 0xcad8bf510b1 <Symbol: [[pendingCloseRequest]]>#14#
                 8: 0xcad8bf510e9 <Symbol: [[pendingAbortRequest]]>#15#
                 9: 0xcad8bf51121 <Symbol: [[state]]>#16#
                  ...
 #6# 0xdde6392a081: 0xdde6392a081 <SimpleQueue map = 0x246fed129769>
             front: 0xdde6392a0b9 <Object map = 0x246fed129609>#17#
              back: 0xdde6392a0b9 <Object map = 0x246fed129609>#17#
            cursor: 1
              size: 1
 #7# 0xdde63917949: 0xdde63917949 <JSFunction WritableStreamDefaultControllerProcessClose (sfi = 0x2fd12db61b21)>
 #8# 0xd