MCPcopy Index your code
hub / github.com/nodejs/node / CheckScopeChain

Function CheckScopeChain

deps/v8/test/debugger/debug/debug-scopes.js:101–117  ·  view source on GitHub ↗
(scopes, exec_state)

Source from the content-addressed store, hash-verified

99
100// Check that the scope chain contains the expected types of scopes.
101function CheckScopeChain(scopes, exec_state) {
102 var all_scopes = exec_state.frame().allScopes();
103 assertEquals(scopes.length, exec_state.frame().scopeCount());
104 assertEquals(scopes.length, all_scopes.length, "FrameMirror.allScopes length");
105 for (var i = 0; i < scopes.length; i++) {
106 var scope = exec_state.frame().scope(i);
107 assertEquals(scopes[i], scope.scopeType());
108 assertScopeMirrorEquals(all_scopes[i], scope);
109
110 // Check the global object when hitting the global scope.
111 if (scopes[i] == debug.ScopeType.Global) {
112 // Just check the marker of the global object.
113 assertEquals(scope.scopeObject().value().global_marker, global_marker);
114 }
115 }
116 CheckFastAllScopes(scopes, exec_state);
117}
118
119
120// Check that the scope chain contains the expected names of scopes.

Callers 1

debug-scopes.jsFile · 0.70

Calls 5

allScopesMethod · 0.80
assertScopeMirrorEqualsFunction · 0.70
CheckFastAllScopesFunction · 0.70
assertEqualsFunction · 0.50
valueMethod · 0.45

Tested by

no test coverage detected