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 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 } | 601 } |
602 #endif | 602 #endif |
603 } | 603 } |
604 | 604 |
605 | 605 |
606 DebugInfoListNode::DebugInfoListNode(DebugInfo* debug_info): next_(NULL) { | 606 DebugInfoListNode::DebugInfoListNode(DebugInfo* debug_info): next_(NULL) { |
607 // Globalize the request debug info object and make it weak. | 607 // Globalize the request debug info object and make it weak. |
608 GlobalHandles* global_handles = debug_info->GetIsolate()->global_handles(); | 608 GlobalHandles* global_handles = debug_info->GetIsolate()->global_handles(); |
609 debug_info_ = Handle<DebugInfo>::cast(global_handles->Create(debug_info)); | 609 debug_info_ = Handle<DebugInfo>::cast(global_handles->Create(debug_info)); |
610 typedef PhantomCallbackData<void>::Callback Callback; | 610 typedef PhantomCallbackData<void>::Callback Callback; |
611 GlobalHandles::MakePhantom( | 611 GlobalHandles::MakeWeak( |
612 reinterpret_cast<Object**>(debug_info_.location()), this, 0, | 612 reinterpret_cast<Object**>(debug_info_.location()), this, |
613 reinterpret_cast<Callback>(Debug::HandlePhantomDebugInfo)); | 613 reinterpret_cast<Callback>(Debug::HandlePhantomDebugInfo), |
| 614 v8::WeakCallbackType::kParameter); |
614 } | 615 } |
615 | 616 |
616 | 617 |
617 DebugInfoListNode::~DebugInfoListNode() { | 618 DebugInfoListNode::~DebugInfoListNode() { |
618 GlobalHandles::Destroy(reinterpret_cast<Object**>(debug_info_.location())); | 619 GlobalHandles::Destroy(reinterpret_cast<Object**>(debug_info_.location())); |
619 } | 620 } |
620 | 621 |
621 | 622 |
622 bool Debug::CompileDebuggerScript(Isolate* isolate, int index) { | 623 bool Debug::CompileDebuggerScript(Isolate* isolate, int index) { |
623 Factory* factory = isolate->factory(); | 624 Factory* factory = isolate->factory(); |
(...skipping 2757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3381 logger_->DebugEvent("Put", message.text()); | 3382 logger_->DebugEvent("Put", message.text()); |
3382 } | 3383 } |
3383 | 3384 |
3384 | 3385 |
3385 void LockingCommandMessageQueue::Clear() { | 3386 void LockingCommandMessageQueue::Clear() { |
3386 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 3387 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
3387 queue_.Clear(); | 3388 queue_.Clear(); |
3388 } | 3389 } |
3389 | 3390 |
3390 } } // namespace v8::internal | 3391 } } // namespace v8::internal |
OLD | NEW |