浏览代码

LibWeb: Move the read bytes into ReadLoopReadRequest's success callback

The callback is already specified to take the bytes by value. No need to
copy the bytes here.
Timothy Flynn 1 年之前
父节点
当前提交
46b8a3afb7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Userland/Libraries/LibWeb/Streams/ReadableStreamDefaultReader.cpp

+ 1 - 1
Userland/Libraries/LibWeb/Streams/ReadableStreamDefaultReader.cpp

@@ -107,7 +107,7 @@ void ReadLoopReadRequest::on_chunk(JS::Value chunk)
 void ReadLoopReadRequest::on_close()
 {
     // 1. Call successSteps with bytes.
-    m_success_steps(m_bytes);
+    m_success_steps(move(m_bytes));
 }
 
 // error steps, given e