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

Side by Side Diff: src/debug.cc

Issue 1136733002: Don't create debug context if debug listener is not set (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed review comment 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/api.cc ('k') | src/runtime/runtime-debug.cc » ('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 2785 matching lines...) Expand 10 before | Expand all | Expand 10 after
2796 // Create the execution state. 2796 // Create the execution state.
2797 Handle<Object> exec_state; 2797 Handle<Object> exec_state;
2798 // Bail out and don't call debugger if exception. 2798 // Bail out and don't call debugger if exception.
2799 if (!MakeExecutionState().ToHandle(&exec_state)) return; 2799 if (!MakeExecutionState().ToHandle(&exec_state)) return;
2800 2800
2801 CallEventCallback(event, exec_state, event_data, NULL); 2801 CallEventCallback(event, exec_state, event_data, NULL);
2802 } 2802 }
2803 2803
2804 2804
2805 Handle<Context> Debug::GetDebugContext() { 2805 Handle<Context> Debug::GetDebugContext() {
2806 if (!is_loaded()) return Handle<Context>();
2806 DebugScope debug_scope(this); 2807 DebugScope debug_scope(this);
2807 if (debug_scope.failed()) return Handle<Context>(); 2808 if (debug_scope.failed()) return Handle<Context>();
2808 // The global handle may be destroyed soon after. Return it reboxed. 2809 // The global handle may be destroyed soon after. Return it reboxed.
2809 return handle(*debug_context(), isolate_); 2810 return handle(*debug_context(), isolate_);
2810 } 2811 }
2811 2812
2812 2813
2813 void Debug::NotifyMessageHandler(v8::DebugEvent event, 2814 void Debug::NotifyMessageHandler(v8::DebugEvent event,
2814 Handle<JSObject> exec_state, 2815 Handle<JSObject> exec_state,
2815 Handle<JSObject> event_data, 2816 Handle<JSObject> event_data,
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
3399 logger_->DebugEvent("Put", message.text()); 3400 logger_->DebugEvent("Put", message.text());
3400 } 3401 }
3401 3402
3402 3403
3403 void LockingCommandMessageQueue::Clear() { 3404 void LockingCommandMessageQueue::Clear() {
3404 base::LockGuard<base::Mutex> lock_guard(&mutex_); 3405 base::LockGuard<base::Mutex> lock_guard(&mutex_);
3405 queue_.Clear(); 3406 queue_.Clear();
3406 } 3407 }
3407 3408
3408 } } // namespace v8::internal 3409 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698