mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
feat: add protocol.handle (#36674)
This commit is contained in:
@@ -85,7 +85,10 @@ void NodeStreamLoader::NotifyComplete(int result) {
|
||||
return;
|
||||
}
|
||||
|
||||
client_->OnComplete(network::URLLoaderCompletionStatus(result));
|
||||
network::URLLoaderCompletionStatus status(result);
|
||||
status.completion_time = base::TimeTicks::Now();
|
||||
status.decoded_body_length = bytes_written_;
|
||||
client_->OnComplete(status);
|
||||
delete this;
|
||||
}
|
||||
|
||||
@@ -126,6 +129,8 @@ void NodeStreamLoader::ReadMore() {
|
||||
// Hold the buffer until the write is done.
|
||||
buffer_.Reset(isolate_, buffer);
|
||||
|
||||
bytes_written_ += node::Buffer::Length(buffer);
|
||||
|
||||
// Write buffer to mojo pipe asynchronously.
|
||||
is_reading_ = false;
|
||||
is_writing_ = true;
|
||||
|
||||
Reference in New Issue
Block a user