| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/debug/debug-evaluate.h" | 5 #include "src/debug/debug-evaluate.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/contexts.h" | 8 #include "src/contexts.h" |
| 9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
| 10 #include "src/debug/debug-frames.h" | 10 #include "src/debug/debug-frames.h" |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 evaluation_context_ = outer_context; | 176 evaluation_context_ = outer_context; |
| 177 break; | 177 break; |
| 178 } else if (scope_type == ScopeIterator::ScopeTypeCatch || | 178 } else if (scope_type == ScopeIterator::ScopeTypeCatch || |
| 179 scope_type == ScopeIterator::ScopeTypeWith) { | 179 scope_type == ScopeIterator::ScopeTypeWith) { |
| 180 ContextChainElement context_chain_element; | 180 ContextChainElement context_chain_element; |
| 181 Handle<Context> current_context = it.CurrentContext(); | 181 Handle<Context> current_context = it.CurrentContext(); |
| 182 if (!current_context->IsDebugEvaluateContext()) { | 182 if (!current_context->IsDebugEvaluateContext()) { |
| 183 context_chain_element.wrapped_context = current_context; | 183 context_chain_element.wrapped_context = current_context; |
| 184 } | 184 } |
| 185 context_chain_.Add(context_chain_element); | 185 context_chain_.Add(context_chain_element); |
| 186 } else if (scope_type == ScopeIterator::ScopeTypeBlock) { | 186 } else if (scope_type == ScopeIterator::ScopeTypeBlock || |
| 187 scope_type == ScopeIterator::ScopeTypeEval) { |
| 187 Handle<JSObject> materialized = factory->NewJSObjectWithNullProto(); | 188 Handle<JSObject> materialized = factory->NewJSObjectWithNullProto(); |
| 188 frame_inspector.MaterializeStackLocals(materialized, | 189 frame_inspector.MaterializeStackLocals(materialized, |
| 189 it.CurrentScopeInfo()); | 190 it.CurrentScopeInfo()); |
| 190 ContextChainElement context_chain_element; | 191 ContextChainElement context_chain_element; |
| 191 context_chain_element.scope_info = it.CurrentScopeInfo(); | 192 context_chain_element.scope_info = it.CurrentScopeInfo(); |
| 192 context_chain_element.materialized_object = materialized; | 193 context_chain_element.materialized_object = materialized; |
| 193 if (it.HasContext()) { | 194 if (it.HasContext()) { |
| 194 context_chain_element.wrapped_context = it.CurrentContext(); | 195 context_chain_element.wrapped_context = it.CurrentContext(); |
| 195 } | 196 } |
| 196 context_chain_.Add(context_chain_element); | 197 context_chain_.Add(context_chain_element); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 // referenced by the current function, so it can be correctly resolved. | 250 // referenced by the current function, so it can be correctly resolved. |
| 250 return; | 251 return; |
| 251 } else if (local_function->shared()->scope_info()->HasReceiver()) { | 252 } else if (local_function->shared()->scope_info()->HasReceiver()) { |
| 252 recv = handle(frame_->receiver(), isolate_); | 253 recv = handle(frame_->receiver(), isolate_); |
| 253 } | 254 } |
| 254 JSObject::SetOwnPropertyIgnoreAttributes(target, name, recv, NONE).Check(); | 255 JSObject::SetOwnPropertyIgnoreAttributes(target, name, recv, NONE).Check(); |
| 255 } | 256 } |
| 256 | 257 |
| 257 } // namespace internal | 258 } // namespace internal |
| 258 } // namespace v8 | 259 } // namespace v8 |
| OLD | NEW |