Reviewers: Kevin Millikin,
Message:
PTAL. Will also run WebKit tests over night.
Description:
Reapply r9673 "Scope tree serialization and ScopeIterator cleanup."
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) {
Please review this at http://codereview.chromium.org/8344046/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/ast-inl.h
M src/ast.h
M src/contexts.h
M src/objects.h
M src/parser.h
M src/parser.cc
M src/runtime.cc
M src/scopeinfo.h
M src/scopeinfo.cc
M src/scopes.h
M src/scopes.cc
M src/v8globals.h
M test/cctest/test-parsing.cc
M test/mjsunit/debug-scopes.js
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev