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

Side by Side Diff: src/debug.cc

Issue 1132643004: Debugger: preserve stepping state after evaluating breakpoint condition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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.h ('k') | test/mjsunit/regress/regress-crbug-467180.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 // triggered. This function returns a JSArray with the break point objects 890 // triggered. This function returns a JSArray with the break point objects
891 // which is triggered. 891 // which is triggered.
892 Handle<Object> Debug::CheckBreakPoints(Handle<Object> break_point_objects) { 892 Handle<Object> Debug::CheckBreakPoints(Handle<Object> break_point_objects) {
893 Factory* factory = isolate_->factory(); 893 Factory* factory = isolate_->factory();
894 894
895 // Count the number of break points hit. If there are multiple break points 895 // Count the number of break points hit. If there are multiple break points
896 // they are in a FixedArray. 896 // they are in a FixedArray.
897 Handle<FixedArray> break_points_hit; 897 Handle<FixedArray> break_points_hit;
898 int break_points_hit_count = 0; 898 int break_points_hit_count = 0;
899 DCHECK(!break_point_objects->IsUndefined()); 899 DCHECK(!break_point_objects->IsUndefined());
900
901 // Break points are checked by calling into Javascript. This could change
902 // the stepping state we are currently in.
903 PreserveDebugState state(this);
yurys 2015/05/15 22:04:41 I wonder how evaluating breakpoint condition can c
904
900 if (break_point_objects->IsFixedArray()) { 905 if (break_point_objects->IsFixedArray()) {
901 Handle<FixedArray> array(FixedArray::cast(*break_point_objects)); 906 Handle<FixedArray> array(FixedArray::cast(*break_point_objects));
902 break_points_hit = factory->NewFixedArray(array->length()); 907 break_points_hit = factory->NewFixedArray(array->length());
903 for (int i = 0; i < array->length(); i++) { 908 for (int i = 0; i < array->length(); i++) {
904 Handle<Object> o(array->get(i), isolate_); 909 Handle<Object> o(array->get(i), isolate_);
905 if (CheckBreakPoint(o)) { 910 if (CheckBreakPoint(o)) {
906 break_points_hit->set(break_points_hit_count++, *o); 911 break_points_hit->set(break_points_hit_count++, *o);
907 } 912 }
908 } 913 }
909 } else { 914 } else {
(...skipping 2490 matching lines...) Expand 10 before | Expand all | Expand 10 after
3400 logger_->DebugEvent("Put", message.text()); 3405 logger_->DebugEvent("Put", message.text());
3401 } 3406 }
3402 3407
3403 3408
3404 void LockingCommandMessageQueue::Clear() { 3409 void LockingCommandMessageQueue::Clear() {
3405 base::LockGuard<base::Mutex> lock_guard(&mutex_); 3410 base::LockGuard<base::Mutex> lock_guard(&mutex_);
3406 queue_.Clear(); 3411 queue_.Clear();
3407 } 3412 }
3408 3413
3409 } } // namespace v8::internal 3414 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/debug.h ('k') | test/mjsunit/regress/regress-crbug-467180.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698