mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: allow ClientRequest responses to be throttled (#25531)
* fix: allow net streams to be throttled [WIP] * fix: handle resume throttling within IncomingMessage [WIP] * fix: fix urlLoader typing, add throttle test * fix: fix lint and increase test timeout for Linux * fix: increase test chunk limit to 20 and timeout to 2000 Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
This commit is contained in:
@@ -458,8 +458,8 @@ void SimpleURLLoaderWrapper::OnDataReceived(base::StringPiece string_piece,
|
||||
auto array_buffer = v8::ArrayBuffer::New(isolate, string_piece.size());
|
||||
auto backing_store = array_buffer->GetBackingStore();
|
||||
memcpy(backing_store->Data(), string_piece.data(), string_piece.size());
|
||||
Emit("data", array_buffer);
|
||||
std::move(resume).Run();
|
||||
Emit("data", array_buffer,
|
||||
base::AdaptCallbackForRepeating(std::move(resume)));
|
||||
}
|
||||
|
||||
void SimpleURLLoaderWrapper::OnComplete(bool success) {
|
||||
|
||||
Reference in New Issue
Block a user