-
keuchel@chromium.org authored
This also includes the two fixes from r9674 and r9675. Here's the diff to the previous CL. --- a/src/runtime.cc +++ b/src/runtime.cc @@ -11133,17 +11133,26 @@ class ScopeIterator { context_(Context::cast(frame->context())), nested_scope_chain_(4) { + // Catch the case when the debugger stops in an internal function. + Handle<SharedFunctionInfo> shared_info(function_->shared()); + if (shared_info->script() == isolate->heap()->undefined_value()) { + if (shared_info->scope_info()->HasContext()) Next(); + return; + } + // Check whether we are in global code or function code. If there is a stack // slot for .result then this function has been created for evaluating // global code and it is not a real function. // Checking for the existence of .result seems fragile, but the scope info // saved with the code object does not otherwise have that information. - int index = function_->shared()->scope_info()-> + int index = shared_info->scope_info()-> StackSlotIndex(isolate_->heap()->result_symbol()); // Reparse the code and analyze the scopes. ZoneScope zone_scope(isolate, DELETE_ON_EXIT); - Handle<SharedFunctionInfo> shared_info(function_->shared()); Handle<Script> script(Script::cast(shared_info->script())); Scope* scope; if (index >= 0) { Review URL: http://codereview.chromium.org/8344046 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
666c4be2