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/debug/debug.h" | 5 #include "src/debug/debug.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/api.h" | 9 #include "src/api.h" |
10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 // Return if debugger is already loaded. | 446 // Return if debugger is already loaded. |
447 if (is_loaded()) return true; | 447 if (is_loaded()) return true; |
448 | 448 |
449 // Bail out if we're already in the process of compiling the native | 449 // Bail out if we're already in the process of compiling the native |
450 // JavaScript source code for the debugger. | 450 // JavaScript source code for the debugger. |
451 if (is_suppressed_) return false; | 451 if (is_suppressed_) return false; |
452 SuppressDebug while_loading(this); | 452 SuppressDebug while_loading(this); |
453 | 453 |
454 // Disable breakpoints and interrupts while compiling and running the | 454 // Disable breakpoints and interrupts while compiling and running the |
455 // debugger scripts including the context creation code. | 455 // debugger scripts including the context creation code. |
456 DisableBreak disable(this, true); | 456 DisableBreak disable(this); |
457 PostponeInterruptsScope postpone(isolate_); | 457 PostponeInterruptsScope postpone(isolate_); |
458 | 458 |
459 // Create the debugger context. | 459 // Create the debugger context. |
460 HandleScope scope(isolate_); | 460 HandleScope scope(isolate_); |
461 ExtensionConfiguration no_extensions; | 461 ExtensionConfiguration no_extensions; |
462 // TODO(yangguo): we rely on the fact that first context snapshot is usable | 462 // TODO(yangguo): we rely on the fact that first context snapshot is usable |
463 // as debug context. This dependency is gone once we remove | 463 // as debug context. This dependency is gone once we remove |
464 // debug context completely. | 464 // debug context completely. |
465 static const int kFirstContextSnapshotIndex = 0; | 465 static const int kFirstContextSnapshotIndex = 0; |
466 Handle<Context> context = isolate_->bootstrapper()->CreateEnvironment( | 466 Handle<Context> context = isolate_->bootstrapper()->CreateEnvironment( |
(...skipping 2027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2494 logger_->DebugEvent("Put", message.text()); | 2494 logger_->DebugEvent("Put", message.text()); |
2495 } | 2495 } |
2496 | 2496 |
2497 void LockingCommandMessageQueue::Clear() { | 2497 void LockingCommandMessageQueue::Clear() { |
2498 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 2498 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
2499 queue_.Clear(); | 2499 queue_.Clear(); |
2500 } | 2500 } |
2501 | 2501 |
2502 } // namespace internal | 2502 } // namespace internal |
2503 } // namespace v8 | 2503 } // namespace v8 |
OLD | NEW |