fix: correctly handle nexttick scheduling in stream reads (#24022)
This commit is contained in:
parent
130b176796
commit
81d09bea44
3 changed files with 47 additions and 1 deletions
|
@ -87,6 +87,11 @@ class NodeStreamLoader : public network::mojom::URLLoader {
|
|||
// flag.
|
||||
bool readable_ = false;
|
||||
|
||||
// It's possible for reads to be queued using nextTick() during read()
|
||||
// which will cause 'readable' to emit during ReadMore, so we track if
|
||||
// that occurred in a flag.
|
||||
bool has_read_waiting_ = false;
|
||||
|
||||
// Store the V8 callbacks to unsubscribe them later.
|
||||
std::map<std::string, v8::Global<v8::Value>> handlers_;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue