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 1089893002: Debugger: clean up debug events. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 | « include/v8-debug.h ('k') | src/debug-debugger.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 2806 matching lines...) Expand 10 before | Expand all | Expand 10 after
2817 bool auto_continue) { 2817 bool auto_continue) {
2818 // Prevent other interrupts from triggering, for example API callbacks, 2818 // Prevent other interrupts from triggering, for example API callbacks,
2819 // while dispatching message handler callbacks. 2819 // while dispatching message handler callbacks.
2820 PostponeInterruptsScope no_interrupts(isolate_); 2820 PostponeInterruptsScope no_interrupts(isolate_);
2821 DCHECK(is_active_); 2821 DCHECK(is_active_);
2822 HandleScope scope(isolate_); 2822 HandleScope scope(isolate_);
2823 // Process the individual events. 2823 // Process the individual events.
2824 bool sendEventMessage = false; 2824 bool sendEventMessage = false;
2825 switch (event) { 2825 switch (event) {
2826 case v8::Break: 2826 case v8::Break:
2827 case v8::BreakForCommand:
2828 sendEventMessage = !auto_continue; 2827 sendEventMessage = !auto_continue;
2829 break; 2828 break;
2829 case v8::NewFunction:
2830 case v8::BeforeCompile:
2831 case v8::CompileError:
2832 case v8::PromiseEvent:
2833 case v8::AsyncTaskEvent:
2834 break;
2830 case v8::Exception: 2835 case v8::Exception:
2831 sendEventMessage = true;
2832 break;
2833 case v8::BeforeCompile:
2834 break;
2835 case v8::AfterCompile: 2836 case v8::AfterCompile:
2836 sendEventMessage = true; 2837 sendEventMessage = true;
2837 break; 2838 break;
2838 case v8::NewFunction:
2839 break;
2840 default:
2841 UNREACHABLE();
2842 } 2839 }
2843 2840
2844 // The debug command interrupt flag might have been set when the command was 2841 // The debug command interrupt flag might have been set when the command was
2845 // added. It should be enough to clear the flag only once while we are in the 2842 // added. It should be enough to clear the flag only once while we are in the
2846 // debugger. 2843 // debugger.
2847 DCHECK(in_debug_scope()); 2844 DCHECK(in_debug_scope());
2848 isolate_->stack_guard()->ClearDebugCommand(); 2845 isolate_->stack_guard()->ClearDebugCommand();
2849 2846
2850 // Notify the debugger that a debug event has occurred unless auto continue is 2847 // Notify the debugger that a debug event has occurred unless auto continue is
2851 // active in which case no event is send. 2848 // active in which case no event is send.
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
3403 logger_->DebugEvent("Put", message.text()); 3400 logger_->DebugEvent("Put", message.text());
3404 } 3401 }
3405 3402
3406 3403
3407 void LockingCommandMessageQueue::Clear() { 3404 void LockingCommandMessageQueue::Clear() {
3408 base::LockGuard<base::Mutex> lock_guard(&mutex_); 3405 base::LockGuard<base::Mutex> lock_guard(&mutex_);
3409 queue_.Clear(); 3406 queue_.Clear();
3410 } 3407 }
3411 3408
3412 } } // namespace v8::internal 3409 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8-debug.h ('k') | src/debug-debugger.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698