fix: stream protocols sometimes flake out (#21113)
This commit is contained in:
parent
f4371b3f03
commit
4045852e6f
1 changed files with 1 additions and 8 deletions
|
@ -26,10 +26,7 @@ NodeStreamLoader::NodeStreamLoader(network::ResourceResponseHead head,
|
|||
base::BindOnce(&NodeStreamLoader::NotifyComplete,
|
||||
weak_factory_.GetWeakPtr(), net::ERR_FAILED));
|
||||
|
||||
// PostTask since it might destruct.
|
||||
base::SequencedTaskRunnerHandle::Get()->PostTask(
|
||||
FROM_HERE, base::BindOnce(&NodeStreamLoader::Start,
|
||||
weak_factory_.GetWeakPtr(), std::move(head)));
|
||||
Start(std::move(head));
|
||||
}
|
||||
|
||||
NodeStreamLoader::~NodeStreamLoader() {
|
||||
|
@ -44,10 +41,6 @@ NodeStreamLoader::~NodeStreamLoader() {
|
|||
node::MakeCallback(isolate_, emitter_.Get(isolate_), "removeListener",
|
||||
node::arraysize(args), args, {0, 0});
|
||||
}
|
||||
|
||||
// Release references.
|
||||
emitter_.Reset();
|
||||
buffer_.Reset();
|
||||
}
|
||||
|
||||
void NodeStreamLoader::Start(network::ResourceResponseHead head) {
|
||||
|
|
Loading…
Reference in a new issue