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

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

Issue 1690173002: Ignore pause on debugger statement when breakpoints are disabled (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | no next file » | 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 353fa671d394c48dc82029d5b0d987543d2146b7..3187f152f90d4d9c8627b84f85951ca9ffee971c 100644
--- a/test/cctest/test-debug.cc
+++ b/test/cctest/test-debug.cc
@@ -4327,6 +4327,22 @@ TEST(DisableBreak) {
CheckDebuggerUnloaded(env->GetIsolate());
}
+TEST(DisableDebuggerStatement) {
+ DebugLocalContext env;
+ v8::HandleScope scope(env->GetIsolate());
+
+ // Register a debug event listener which sets the break flag and counts.
+ v8::Debug::SetDebugEventListener(env->GetIsolate(), DebugEventCounter);
+ CompileRun("debugger;");
+ CHECK_EQ(1, break_point_hit_count);
+
+ // Check that we ignore debugger statement when breakpoints aren't active.
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(env->GetIsolate());
+ isolate->debug()->set_break_points_active(false);
+ CompileRun("debugger;");
+ CHECK_EQ(1, break_point_hit_count);
+}
+
static const char* kSimpleExtensionSource =
"(function Foo() {"
" return 4;"
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698