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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
9 #include "src/frames-inl.h" | 9 #include "src/frames-inl.h" |
10 #include "src/globals.h" | 10 #include "src/globals.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // inspect the function scope. | 56 // inspect the function scope. |
57 // This can only happen if we set a break point inside right before the | 57 // This can only happen if we set a break point inside right before the |
58 // return, which requires a debug info to be available. | 58 // return, which requires a debug info to be available. |
59 Handle<DebugInfo> debug_info(shared_info->GetDebugInfo()); | 59 Handle<DebugInfo> debug_info(shared_info->GetDebugInfo()); |
60 | 60 |
61 // PC points to the instruction after the current one, possibly a break | 61 // PC points to the instruction after the current one, possibly a break |
62 // location as well. So the "- 1" to exclude it from the search. | 62 // location as well. So the "- 1" to exclude it from the search. |
63 Address call_pc = GetFrame()->pc() - 1; | 63 Address call_pc = GetFrame()->pc() - 1; |
64 | 64 |
65 // Find the break point where execution has stopped. | 65 // Find the break point where execution has stopped. |
66 BreakLocation location = | 66 BreakLocation location = BreakLocation::FromAddress(debug_info, call_pc); |
67 BreakLocation::FromAddress(debug_info, ALL_BREAK_LOCATIONS, call_pc); | |
68 | 67 |
69 ignore_nested_scopes = location.IsReturn(); | 68 ignore_nested_scopes = location.IsReturn(); |
70 } | 69 } |
71 | 70 |
72 if (ignore_nested_scopes) { | 71 if (ignore_nested_scopes) { |
73 if (scope_info->HasContext()) { | 72 if (scope_info->HasContext()) { |
74 context_ = Handle<Context>(context_->declaration_context(), isolate_); | 73 context_ = Handle<Context>(context_->declaration_context(), isolate_); |
75 } else { | 74 } else { |
76 while (context_->closure() == *function) { | 75 while (context_->closure() == *function) { |
77 context_ = Handle<Context>(context_->previous(), isolate_); | 76 context_ = Handle<Context>(context_->previous(), isolate_); |
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 isolate_, value, Object::GetPropertyOrElement(extension, key), false); | 816 isolate_, value, Object::GetPropertyOrElement(extension, key), false); |
818 RETURN_ON_EXCEPTION_VALUE( | 817 RETURN_ON_EXCEPTION_VALUE( |
819 isolate_, JSObject::SetOwnPropertyIgnoreAttributes( | 818 isolate_, JSObject::SetOwnPropertyIgnoreAttributes( |
820 scope_object, key, value, NONE), false); | 819 scope_object, key, value, NONE), false); |
821 } | 820 } |
822 return true; | 821 return true; |
823 } | 822 } |
824 | 823 |
825 } // namespace internal | 824 } // namespace internal |
826 } // namespace v8 | 825 } // namespace v8 |
OLD | NEW |