Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: src/debug/debug-scopes.cc

Issue 1610073002: [debugger] negative conditional break points mute breaks and exceptions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix test Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/debug/debug.cc ('k') | test/mjsunit/debug-negative-break-points.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 bool collect_non_locals = (option == COLLECT_NON_LOCALS); 51 bool collect_non_locals = (option == COLLECT_NON_LOCALS);
52 if (!ignore_nested_scopes && shared_info->HasDebugInfo()) { 52 if (!ignore_nested_scopes && shared_info->HasDebugInfo()) {
53 // The source position at return is always the end of the function, 53 // The source position at return is always the end of the function,
54 // which is not consistent with the current scope chain. Therefore all 54 // which is not consistent with the current scope chain. Therefore all
55 // nested with, catch and block contexts are skipped, and we can only 55 // nested with, catch and block contexts are skipped, and we can only
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
62 // location as well. So the "- 1" to exclude it from the search.
63 Address call_pc = GetFrame()->pc() - 1;
64
65 // Find the break point where execution has stopped. 61 // Find the break point where execution has stopped.
66 BreakLocation location = BreakLocation::FromAddress(debug_info, call_pc); 62 BreakLocation location = BreakLocation::FromFrame(debug_info, GetFrame());
67 63
68 ignore_nested_scopes = location.IsReturn(); 64 ignore_nested_scopes = location.IsReturn();
69 } 65 }
70 66
71 if (ignore_nested_scopes) { 67 if (ignore_nested_scopes) {
72 if (scope_info->HasContext()) { 68 if (scope_info->HasContext()) {
73 context_ = Handle<Context>(context_->declaration_context(), isolate_); 69 context_ = Handle<Context>(context_->declaration_context(), isolate_);
74 } else { 70 } else {
75 while (context_->closure() == *function) { 71 while (context_->closure() == *function) {
76 context_ = Handle<Context>(context_->previous(), isolate_); 72 context_ = Handle<Context>(context_->previous(), isolate_);
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 isolate_, value, Object::GetPropertyOrElement(extension, key), false); 812 isolate_, value, Object::GetPropertyOrElement(extension, key), false);
817 RETURN_ON_EXCEPTION_VALUE( 813 RETURN_ON_EXCEPTION_VALUE(
818 isolate_, JSObject::SetOwnPropertyIgnoreAttributes( 814 isolate_, JSObject::SetOwnPropertyIgnoreAttributes(
819 scope_object, key, value, NONE), false); 815 scope_object, key, value, NONE), false);
820 } 816 }
821 return true; 817 return true;
822 } 818 }
823 819
824 } // namespace internal 820 } // namespace internal
825 } // namespace v8 821 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug/debug.cc ('k') | test/mjsunit/debug-negative-break-points.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698