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

Function CheckScopeChain

deps/v8/test/debugger/debug/es6/generators-debug-scopes.js:67–82  ·  view source on GitHub ↗
(scopes, exec_state)

Source from the content-addressed store, hash-verified

65
66// Check that the scope chain contains the expected types of scopes.
67function CheckScopeChain(scopes, exec_state) {
68 var all_scopes = exec_state.frame().allScopes();
69 assertEquals(scopes.length, exec_state.frame().scopeCount());
70 assertEquals(scopes.length, all_scopes.length, "FrameMirror.allScopes length");
71 for (var i = 0; i < scopes.length; i++) {
72 var scope = exec_state.frame().scope(i);
73 assertEquals(scopes[i], scope.scopeType());
74 assertScopeMirrorEquals(all_scopes[i], scope);
75
76 // Check the global object when hitting the global scope.
77 if (scopes[i] == debug.ScopeType.Global) {
78 assertEquals(global_marker, scope.scopeObject().value().global_marker);
79 }
80 }
81 CheckFastAllScopes(scopes, exec_state);
82}
83
84// Check that the content of the scope is as expected. For functions just check
85// that there is a function.

Callers 1

Calls 5

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…