forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1781061 - Part 7: Use JSOp::CallContentIter instead of JSOp::Call…
…Iter in self-hosted JS. r=jandem Differential Revision: https://phabricator.services.mozilla.com/D153160
- Loading branch information
Showing
3 changed files
with
58 additions
and
5 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
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,24 @@ | ||
// Test that the onNativeCall hook is called when native function is | ||
// called inside self-hosted JS as part of iteration. | ||
|
||
load(libdir + 'eqArrayHelper.js'); | ||
|
||
var g = newGlobal({ newCompartment: true }); | ||
var dbg = new Debugger(); | ||
var gdbg = dbg.addDebuggee(g); | ||
|
||
const rv = []; | ||
dbg.onNativeCall = (callee, reason) => { | ||
rv.push(callee.name); | ||
}; | ||
|
||
gdbg.executeInGlobal(` | ||
Array.from([1, 2, 3]); | ||
`); | ||
assertEqArray(rv, [ | ||
"from", | ||
// FIXME: This is internal function (bug 1782677). | ||
"IteratorMethod", | ||
"values", | ||
"next", "next", "next", "next", | ||
]); |