fix: session.getBlobData never resolves with blob sizes > 65536 (#35277)
* fix: session.getBlobData never resolves with blob sizes > 65536 (#34398) * Add unit test case for session.getBlobData Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
parent
3a6d6ff008
commit
e3efa16415
2 changed files with 48 additions and 1 deletions
|
@ -86,8 +86,11 @@ class DataPipeReader {
|
|||
if (result == MOJO_RESULT_OK) { // success
|
||||
remaining_size_ -= length;
|
||||
head_ += length;
|
||||
if (remaining_size_ == 0)
|
||||
if (remaining_size_ == 0) {
|
||||
OnSuccess();
|
||||
} else {
|
||||
handle_watcher_.ArmOrNotify();
|
||||
}
|
||||
} else if (result == MOJO_RESULT_SHOULD_WAIT) { // IO pending
|
||||
handle_watcher_.ArmOrNotify();
|
||||
} else { // error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue