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

Side by Side Diff: src/debug.cc

Issue 842153004: Unify phantom and internal fields weak handle callbacks (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Require callback to reset handle. Created 5 years, 11 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
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 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 #endif 709 #endif
710 } 710 }
711 711
712 712
713 DebugInfoListNode::DebugInfoListNode(DebugInfo* debug_info): next_(NULL) { 713 DebugInfoListNode::DebugInfoListNode(DebugInfo* debug_info): next_(NULL) {
714 // Globalize the request debug info object and make it weak. 714 // Globalize the request debug info object and make it weak.
715 GlobalHandles* global_handles = debug_info->GetIsolate()->global_handles(); 715 GlobalHandles* global_handles = debug_info->GetIsolate()->global_handles();
716 debug_info_ = Handle<DebugInfo>::cast(global_handles->Create(debug_info)); 716 debug_info_ = Handle<DebugInfo>::cast(global_handles->Create(debug_info));
717 typedef PhantomCallbackData<void>::Callback Callback; 717 typedef PhantomCallbackData<void>::Callback Callback;
718 GlobalHandles::MakePhantom( 718 GlobalHandles::MakePhantom(
719 reinterpret_cast<Object**>(debug_info_.location()), this, 719 reinterpret_cast<Object**>(debug_info_.location()), this, 0,
720 reinterpret_cast<Callback>(Debug::HandlePhantomDebugInfo)); 720 reinterpret_cast<Callback>(Debug::HandlePhantomDebugInfo));
721 } 721 }
722 722
723 723
724 DebugInfoListNode::~DebugInfoListNode() { 724 DebugInfoListNode::~DebugInfoListNode() {
725 GlobalHandles::Destroy(reinterpret_cast<Object**>(debug_info_.location())); 725 GlobalHandles::Destroy(reinterpret_cast<Object**>(debug_info_.location()));
726 } 726 }
727 727
728 728
729 bool Debug::CompileDebuggerScript(Isolate* isolate, int index) { 729 bool Debug::CompileDebuggerScript(Isolate* isolate, int index) {
(...skipping 2762 matching lines...) Expand 10 before | Expand all | Expand 10 after
3492 logger_->DebugEvent("Put", message.text()); 3492 logger_->DebugEvent("Put", message.text());
3493 } 3493 }
3494 3494
3495 3495
3496 void LockingCommandMessageQueue::Clear() { 3496 void LockingCommandMessageQueue::Clear() {
3497 base::LockGuard<base::Mutex> lock_guard(&mutex_); 3497 base::LockGuard<base::Mutex> lock_guard(&mutex_);
3498 queue_.Clear(); 3498 queue_.Clear();
3499 } 3499 }
3500 3500
3501 } } // namespace v8::internal 3501 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698