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/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 } | 110 } |
111 } | 111 } |
112 | 112 |
113 | 113 |
114 ScopeIterator::ScopeIterator(Isolate* isolate, Handle<JSFunction> function) | 114 ScopeIterator::ScopeIterator(Isolate* isolate, Handle<JSFunction> function) |
115 : isolate_(isolate), | 115 : isolate_(isolate), |
116 frame_inspector_(NULL), | 116 frame_inspector_(NULL), |
117 context_(function->context()), | 117 context_(function->context()), |
118 seen_script_scope_(false), | 118 seen_script_scope_(false), |
119 failed_(false) { | 119 failed_(false) { |
120 if (!function->IsSubjectToDebugging()) context_ = Handle<Context>(); | 120 if (!function->shared()->IsSubjectToDebugging()) context_ = Handle<Context>(); |
121 } | 121 } |
122 | 122 |
123 | 123 |
124 MUST_USE_RESULT MaybeHandle<JSObject> ScopeIterator::MaterializeScopeDetails() { | 124 MUST_USE_RESULT MaybeHandle<JSObject> ScopeIterator::MaterializeScopeDetails() { |
125 // Calculate the size of the result. | 125 // Calculate the size of the result. |
126 Handle<FixedArray> details = | 126 Handle<FixedArray> details = |
127 isolate_->factory()->NewFixedArray(kScopeDetailsSize); | 127 isolate_->factory()->NewFixedArray(kScopeDetailsSize); |
128 // Fill in scope details. | 128 // Fill in scope details. |
129 details->set(kScopeDetailsTypeIndex, Smi::FromInt(Type())); | 129 details->set(kScopeDetailsTypeIndex, Smi::FromInt(Type())); |
130 Handle<JSObject> scope_object; | 130 Handle<JSObject> scope_object; |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 isolate_, value, Object::GetPropertyOrElement(extension, key), false); | 782 isolate_, value, Object::GetPropertyOrElement(extension, key), false); |
783 RETURN_ON_EXCEPTION_VALUE( | 783 RETURN_ON_EXCEPTION_VALUE( |
784 isolate_, JSObject::SetOwnPropertyIgnoreAttributes( | 784 isolate_, JSObject::SetOwnPropertyIgnoreAttributes( |
785 scope_object, key, value, NONE), false); | 785 scope_object, key, value, NONE), false); |
786 } | 786 } |
787 return true; | 787 return true; |
788 } | 788 } |
789 | 789 |
790 } // namespace internal | 790 } // namespace internal |
791 } // namespace v8 | 791 } // namespace v8 |
OLD | NEW |