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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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( |
467 MaybeHandle<JSGlobalProxy>(), v8::Local<ObjectTemplate>(), &no_extensions, | 467 MaybeHandle<JSGlobalProxy>(), v8::Local<ObjectTemplate>(), &no_extensions, |
468 kFirstContextSnapshotIndex, DEBUG_CONTEXT); | 468 kFirstContextSnapshotIndex, nullptr, DEBUG_CONTEXT); |
469 | 469 |
470 // Fail if no context could be created. | 470 // Fail if no context could be created. |
471 if (context.is_null()) return false; | 471 if (context.is_null()) return false; |
472 | 472 |
473 debug_context_ = Handle<Context>::cast( | 473 debug_context_ = Handle<Context>::cast( |
474 isolate_->global_handles()->Create(*context)); | 474 isolate_->global_handles()->Create(*context)); |
475 | 475 |
476 feature_tracker()->Track(DebugFeatureTracker::kActive); | 476 feature_tracker()->Track(DebugFeatureTracker::kActive); |
477 | 477 |
478 return true; | 478 return true; |
(...skipping 2017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2496 logger_->DebugEvent("Put", message.text()); | 2496 logger_->DebugEvent("Put", message.text()); |
2497 } | 2497 } |
2498 | 2498 |
2499 void LockingCommandMessageQueue::Clear() { | 2499 void LockingCommandMessageQueue::Clear() { |
2500 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 2500 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
2501 queue_.Clear(); | 2501 queue_.Clear(); |
2502 } | 2502 } |
2503 | 2503 |
2504 } // namespace internal | 2504 } // namespace internal |
2505 } // namespace v8 | 2505 } // namespace v8 |
OLD | NEW |