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

Unified Diff: test/cctest/test-debug.cc

Issue 1463803002: [debugger] flood function for stepping before calling it. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | test/mjsunit/debug-step-into-json.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-debug.cc
diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc
index a1a9471e986b61281409010c182fcf5af730af6b..8ad082c259ad4241eed8b1f985519e6165f3d9e6 100644
--- a/test/cctest/test-debug.cc
+++ b/test/cctest/test-debug.cc
@@ -347,6 +347,9 @@ static void PrepareStep(StepAction step_action) {
}
+static void ClearStepping() { CcTest::i_isolate()->debug()->ClearStepping(); }
+
+
// This function is in namespace v8::internal to be friend with class
// v8::internal::Debug.
namespace v8 {
@@ -3838,7 +3841,7 @@ TEST(DebugStepFunctionCallApply) {
break_point_hit_count = 0;
foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
- CHECK_EQ(5, break_point_hit_count);
+ CHECK_EQ(6, break_point_hit_count);
v8::Debug::SetDebugEventListener(NULL);
CheckDebuggerUnloaded();
@@ -4211,6 +4214,7 @@ TEST(StepWithException) {
"function h() { x = 1; throw 1; }; ";
// Step through invocation of a.
+ ClearStepping();
v8::Local<v8::Function> a = CompileFunction(&env, src, "a");
SetBreakPoint(a, 0);
step_action = StepIn;
@@ -4221,6 +4225,7 @@ TEST(StepWithException) {
break_point_hit_count);
// Step through invocation of b + c.
+ ClearStepping();
v8::Local<v8::Function> b = CompileFunction(&env, src, "b");
SetBreakPoint(b, 0);
step_action = StepIn;
@@ -4229,7 +4234,9 @@ TEST(StepWithException) {
CHECK(b->Call(context, env->Global(), 0, NULL).IsEmpty());
CHECK_EQ(StrLength(expected_step_sequence),
break_point_hit_count);
+
// Step through invocation of d + e.
+ ClearStepping();
v8::Local<v8::Function> d = CompileFunction(&env, src, "d");
SetBreakPoint(d, 0);
ChangeBreakOnException(false, true);
@@ -4250,6 +4257,7 @@ TEST(StepWithException) {
break_point_hit_count);
// Step through invocation of f + g + h.
+ ClearStepping();
v8::Local<v8::Function> f = CompileFunction(&env, src, "f");
SetBreakPoint(f, 0);
ChangeBreakOnException(false, true);
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | test/mjsunit/debug-step-into-json.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698