| Index: src/debug/debug-scopes.h
|
| diff --git a/src/debug/debug-scopes.h b/src/debug/debug-scopes.h
|
| index fbdf632687320ba0c47c3ce7d982a8623aad1f86..80e19810e742f897731e9f80394304e6afba0207 100644
|
| --- a/src/debug/debug-scopes.h
|
| +++ b/src/debug/debug-scopes.h
|
| @@ -31,7 +31,10 @@ class ScopeIterator {
|
| static const int kScopeDetailsTypeIndex = 0;
|
| static const int kScopeDetailsObjectIndex = 1;
|
| static const int kScopeDetailsNameIndex = 2;
|
| - static const int kScopeDetailsSize = 3;
|
| + static const int kScopeDetailsStartPositionIndex = 3;
|
| + static const int kScopeDetailsEndPositionIndex = 4;
|
| + static const int kScopeDetailsFunctionIndex = 5;
|
| + static const int kScopeDetailsSize = 6;
|
|
|
| enum Option { DEFAULT, IGNORE_NESTED_SCOPES, COLLECT_NON_LOCALS };
|
|
|
| @@ -83,10 +86,18 @@ class ScopeIterator {
|
| #endif
|
|
|
| private:
|
| + struct ExtendedScopeInfo {
|
| + ExtendedScopeInfo(Handle<ScopeInfo> info, int start, int end)
|
| + : scope_info(info), start_position(start), end_position(end) {}
|
| + Handle<ScopeInfo> scope_info;
|
| + int start_position;
|
| + int end_position;
|
| + };
|
| +
|
| Isolate* isolate_;
|
| FrameInspector* const frame_inspector_;
|
| Handle<Context> context_;
|
| - List<Handle<ScopeInfo> > nested_scope_chain_;
|
| + List<ExtendedScopeInfo> nested_scope_chain_;
|
| HashMap* non_locals_;
|
| bool seen_script_scope_;
|
| bool failed_;
|
| @@ -140,6 +151,13 @@ class ScopeIterator {
|
| Handle<JSObject> scope_object,
|
| KeyCollectionType type);
|
|
|
| + // Get the chain of nested scopes within this scope for the source statement
|
| + // position. The scopes will be added to the list from the outermost scope to
|
| + // the innermost scope. Only nested block, catch or with scopes are tracked
|
| + // and will be returned, but no inner function scopes.
|
| + void GetNestedScopeChain(Isolate* isolate, Scope* scope,
|
| + int statement_position);
|
| +
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(ScopeIterator);
|
| };
|
|
|
|
|