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-scopes.h" | 5 #include "src/debug/debug-scopes.h" |
6 | 6 |
7 #include "src/debug/debug.h" | 7 #include "src/debug/debug.h" |
8 #include "src/frames-inl.h" | 8 #include "src/frames-inl.h" |
9 #include "src/globals.h" | 9 #include "src/globals.h" |
10 #include "src/parser.h" | 10 #include "src/parser.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 } | 111 } |
112 } | 112 } |
113 | 113 |
114 | 114 |
115 ScopeIterator::ScopeIterator(Isolate* isolate, Handle<JSFunction> function) | 115 ScopeIterator::ScopeIterator(Isolate* isolate, Handle<JSFunction> function) |
116 : isolate_(isolate), | 116 : isolate_(isolate), |
117 frame_inspector_(NULL), | 117 frame_inspector_(NULL), |
118 context_(function->context()), | 118 context_(function->context()), |
119 seen_script_scope_(false), | 119 seen_script_scope_(false), |
120 failed_(false) { | 120 failed_(false) { |
121 if (function->IsBuiltin()) context_ = Handle<Context>(); | 121 if (!function->IsSubjectToDebugging()) context_ = Handle<Context>(); |
122 } | 122 } |
123 | 123 |
124 | 124 |
125 MUST_USE_RESULT MaybeHandle<JSObject> ScopeIterator::MaterializeScopeDetails() { | 125 MUST_USE_RESULT MaybeHandle<JSObject> ScopeIterator::MaterializeScopeDetails() { |
126 // Calculate the size of the result. | 126 // Calculate the size of the result. |
127 Handle<FixedArray> details = | 127 Handle<FixedArray> details = |
128 isolate_->factory()->NewFixedArray(kScopeDetailsSize); | 128 isolate_->factory()->NewFixedArray(kScopeDetailsSize); |
129 // Fill in scope details. | 129 // Fill in scope details. |
130 details->set(kScopeDetailsTypeIndex, Smi::FromInt(Type())); | 130 details->set(kScopeDetailsTypeIndex, Smi::FromInt(Type())); |
131 Handle<JSObject> scope_object; | 131 Handle<JSObject> scope_object; |
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 // TODO(verwaest): Use AddDataProperty instead. | 760 // TODO(verwaest): Use AddDataProperty instead. |
761 JSObject::SetOwnPropertyIgnoreAttributes( | 761 JSObject::SetOwnPropertyIgnoreAttributes( |
762 scope_object, handle(String::cast(scope_info->get(i + start))), value, | 762 scope_object, handle(String::cast(scope_info->get(i + start))), value, |
763 ::NONE) | 763 ::NONE) |
764 .Check(); | 764 .Check(); |
765 } | 765 } |
766 } | 766 } |
767 | 767 |
768 } // namespace internal | 768 } // namespace internal |
769 } // namespace v8 | 769 } // namespace v8 |
OLD | NEW |