OLD | NEW |
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 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1174 | 1174 |
1175 void Debug::FloodHandlerWithOneShot() { | 1175 void Debug::FloodHandlerWithOneShot() { |
1176 // Iterate through the JavaScript stack looking for handlers. | 1176 // Iterate through the JavaScript stack looking for handlers. |
1177 StackFrame::Id id = break_frame_id(); | 1177 StackFrame::Id id = break_frame_id(); |
1178 if (id == StackFrame::NO_ID) { | 1178 if (id == StackFrame::NO_ID) { |
1179 // If there is no JavaScript stack don't do anything. | 1179 // If there is no JavaScript stack don't do anything. |
1180 return; | 1180 return; |
1181 } | 1181 } |
1182 for (JavaScriptFrameIterator it(isolate_, id); !it.done(); it.Advance()) { | 1182 for (JavaScriptFrameIterator it(isolate_, id); !it.done(); it.Advance()) { |
1183 JavaScriptFrame* frame = it.frame(); | 1183 JavaScriptFrame* frame = it.frame(); |
1184 if (frame->HasHandler()) { | 1184 int stack_slots = 0; // The computed stack slot count is not used. |
1185 // Flood the function with the catch block with break points | 1185 if (frame->LookupExceptionHandlerInTable(&stack_slots) > 0) { |
| 1186 // Flood the function with the catch/finally block with break points. |
1186 FloodWithOneShot(Handle<JSFunction>(frame->function())); | 1187 FloodWithOneShot(Handle<JSFunction>(frame->function())); |
1187 return; | 1188 return; |
1188 } | 1189 } |
1189 } | 1190 } |
1190 } | 1191 } |
1191 | 1192 |
1192 | 1193 |
1193 void Debug::ChangeBreakOnException(ExceptionBreakType type, bool enable) { | 1194 void Debug::ChangeBreakOnException(ExceptionBreakType type, bool enable) { |
1194 if (type == BreakUncaughtException) { | 1195 if (type == BreakUncaughtException) { |
1195 break_on_uncaught_exception_ = enable; | 1196 break_on_uncaught_exception_ = enable; |
(...skipping 2186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3382 logger_->DebugEvent("Put", message.text()); | 3383 logger_->DebugEvent("Put", message.text()); |
3383 } | 3384 } |
3384 | 3385 |
3385 | 3386 |
3386 void LockingCommandMessageQueue::Clear() { | 3387 void LockingCommandMessageQueue::Clear() { |
3387 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 3388 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
3388 queue_.Clear(); | 3389 queue_.Clear(); |
3389 } | 3390 } |
3390 | 3391 |
3391 } } // namespace v8::internal | 3392 } } // namespace v8::internal |
OLD | NEW |