Index: src/debug/debug-scopes.cc |
diff --git a/src/debug/debug-scopes.cc b/src/debug/debug-scopes.cc |
index c7eb0f75f95ef448bc9485651276216fa6c19b1d..1de0d9d4a03e46cd0d8b63f309e5c8ce75730852 100644 |
--- a/src/debug/debug-scopes.cc |
+++ b/src/debug/debug-scopes.cc |
@@ -94,10 +94,7 @@ ScopeIterator::ScopeIterator(Isolate* isolate, FrameInspector* frame_inspector, |
Handle<Script> script(Script::cast(shared_info->script())); |
info.reset(new ParseInfo(&zone, script)); |
info->set_toplevel(); |
- if (scope_info->scope_type() == SCRIPT_SCOPE) { |
- info->set_global(); |
- } else { |
- DCHECK(scope_info->scope_type() == EVAL_SCOPE); |
+ if (scope_info->scope_type() == EVAL_SCOPE) { |
info->set_eval(); |
if (!function->context()->IsNativeContext()) { |
info->set_outer_scope_info(handle(function->context()->scope_info())); |
@@ -105,6 +102,8 @@ ScopeIterator::ScopeIterator(Isolate* isolate, FrameInspector* frame_inspector, |
// Language mode may be inherited from the eval caller. |
// Retrieve it from shared function info. |
info->set_language_mode(shared_info->language_mode()); |
+ } else { |
+ DCHECK(scope_info->scope_type() == SCRIPT_SCOPE); |
} |
} else { |
// Inner function. |