static inline void startReadableStreamAsync(ReadableStream& stream) { RefPtr<ReadableStream> protectedStream = &stream; stream.scriptExecutionContext()->postTask([protectedStream](ScriptExecutionContext&) { protectedStream->start(); }); }
ReadableStreamReader::ReadableStreamReader(ReadableStream& stream) : ActiveDOMObject(stream.scriptExecutionContext()) { #ifndef NDEBUG readableStreamReaderCounter.increment(); #endif suspendIfNeeded(); ASSERT_WITH_MESSAGE(!stream.reader(), "A ReadableStream cannot be locked by two readers at the same time."); m_stream = &stream; stream.lock(*this); }