mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
perf(js/http): avoid v8 deopt in async iterator (#10160)
This commit is contained in:
parent
262ee78592
commit
83f6d4bf94
1 changed files with 2 additions and 2 deletions
|
@ -81,8 +81,8 @@
|
|||
return {
|
||||
async next() {
|
||||
const reqEvt = await httpConn.nextRequest();
|
||||
if (reqEvt === null) return { value: undefined, done: true };
|
||||
return { value: reqEvt, done: false };
|
||||
// Change with caution, current form avoids a v8 deopt
|
||||
return { value: reqEvt, done: reqEvt === null };
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue