MCPcopy Create free account
hub / github.com/nodejs/node / CheckScopeChain

Function CheckScopeChain

deps/v8/test/debugger/bugs/harmony/debug-blockscopes.js:82–94  ·  view source on GitHub ↗
(scopes, exec_state)

Source from the content-addressed store, hash-verified

80
81// Check that the scope chain contains the expected types of scopes.
82function CheckScopeChain(scopes, exec_state) {
83 assertEquals(scopes.length, exec_state.frame().scopeCount());
84 for (var i = 0; i < scopes.length; i++) {
85 var scope = exec_state.frame().scope(i);
86 assertTrue(scope.isScope());
87 assertEquals(scopes[i], scope.scopeType());
88
89 // Check the global object when hitting the global scope.
90 if (scopes[i] == debug.ScopeType.Global) {
91 assertEquals(scope.scopeObject().value().global_marker, global_marker);
92 }
93 }
94}
95
96// Check that the content of the scope is as expected. For functions just check
97// that there is a function.

Callers 1

Calls 3

assertEqualsFunction · 0.50
assertTrueFunction · 0.50
valueMethod · 0.45

Tested by

no test coverage detected