forked from chakra-core/ChakraCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdumpFunctionProperties.js
More file actions
41 lines (35 loc) · 1.14 KB
/
dumpFunctionProperties.js
File metadata and controls
41 lines (35 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
function foo() {
var x = 1; /**bp:dumpFunctionProperties();**/
}
foo();
(function () {
var x = 1; /**bp:dumpFunctionProperties(0, 1);**/
})();
var arr = [0];
arr.forEach((s) => {
var x = 1; /**bp:dumpFunctionProperties([0], '0');**/
});
function same(shouldBreak) {
if (shouldBreak) {
// 0 is same(true), 1 is same(false), 2 is global function). same is dumped only once as functionHandle for frame 0 and 1 is same.
var x = 1; /**bp:stack();dumpFunctionProperties([0,1,2]);**/
} else {
same(!shouldBreak);
}
}
same(false);
function one(arg1) {
two();
}
function two(arg1, arg2) {
three();
}
function three(arg1, arg2, arg3) {
var x = 1; /**bp:stack();dumpFunctionProperties([0,1,2,3], 0);**/
}
one();
WScript.Echo("pass");