-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: remove use of Debug.MakeMirror()
This paves the way for removing `vm.runInDebugContext()`. Inspection of Map and Set iterators is now done through V8 instrinsics. Fixes: #11875 PR-URL: #13295 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Robert Jefe Lindstaedt <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Timothy Gu <[email protected]>
- Loading branch information
1 parent
0028241
commit 05948d8
Showing
6 changed files
with
63 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
lib/internal/v8.js | ||
lib/internal/v8_prof_polyfill.js | ||
lib/punycode.js | ||
test/addons/??_* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
'use strict'; | ||
|
||
function take(it, n) { | ||
const result = []; | ||
for (const e of it) { | ||
if (--n < 0) | ||
break; | ||
result.push(e); | ||
} | ||
return result; | ||
} | ||
|
||
function previewMapIterator(it, n) { | ||
return take(%MapIteratorClone(it), n); | ||
} | ||
|
||
function previewSetIterator(it, n) { | ||
return take(%SetIteratorClone(it), n); | ||
} | ||
|
||
module.exports = { previewMapIterator, previewSetIterator }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters