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

Side by Side Diff: src/debug.cc

Issue 1065213002: Make GetDebugContext a bit more robust. (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 | « no previous file | 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 2786 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 DebugScope debug_scope(this); 2806 DebugScope debug_scope(this);
2807 if (debug_scope.failed()) return Handle<Context>();
2807 // The global handle may be destroyed soon after. Return it reboxed. 2808 // The global handle may be destroyed soon after. Return it reboxed.
2808 return handle(*debug_context(), isolate_); 2809 return handle(*debug_context(), isolate_);
2809 } 2810 }
2810 2811
2811 2812
2812 void Debug::NotifyMessageHandler(v8::DebugEvent event, 2813 void Debug::NotifyMessageHandler(v8::DebugEvent event,
2813 Handle<JSObject> exec_state, 2814 Handle<JSObject> exec_state,
2814 Handle<JSObject> event_data, 2815 Handle<JSObject> event_data,
2815 bool auto_continue) { 2816 bool auto_continue) {
2816 // Prevent other interrupts from triggering, for example API callbacks, 2817 // Prevent other interrupts from triggering, for example API callbacks,
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
3401 logger_->DebugEvent("Put", message.text()); 3402 logger_->DebugEvent("Put", message.text());
3402 } 3403 }
3403 3404
3404 3405
3405 void LockingCommandMessageQueue::Clear() { 3406 void LockingCommandMessageQueue::Clear() {
3406 base::LockGuard<base::Mutex> lock_guard(&mutex_); 3407 base::LockGuard<base::Mutex> lock_guard(&mutex_);
3407 queue_.Clear(); 3408 queue_.Clear();
3408 } 3409 }
3409 3410
3410 } } // namespace v8::internal 3411 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698