[Lldb-commits] [lldb] r197541 - Fix how Queue/QueueItem weak pointers are initialized in the ctors.

Jason Molenda jmolenda at apple.com
Tue Dec 17 16:58:23 PST 2013


Author: jmolenda
Date: Tue Dec 17 18:58:23 2013
New Revision: 197541

URL: http://llvm.org/viewvc/llvm-project?rev=197541&view=rev
Log:
Fix how Queue/QueueItem weak pointers are initialized in the ctors.

Modified:
    lldb/trunk/source/API/SBQueue.cpp
    lldb/trunk/source/Target/Queue.cpp
    lldb/trunk/source/Target/QueueItem.cpp

Modified: lldb/trunk/source/API/SBQueue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBQueue.cpp?rev=197541&r1=197540&r2=197541&view=diff
==============================================================================
--- lldb/trunk/source/API/SBQueue.cpp (original)
+++ lldb/trunk/source/API/SBQueue.cpp Tue Dec 17 18:58:23 2013
@@ -38,12 +38,13 @@ namespace lldb_private
         }
 
         QueueImpl (const lldb::QueueSP &queue_sp) :
-            m_queue_wp(queue_sp),
+            m_queue_wp(),
             m_threads(),
             m_thread_list_fetched(false),
             m_items(),
             m_queue_items_fetched(false)
         {
+            m_queue_wp = queue_sp;
         }
 
         QueueImpl (const QueueImpl &rhs)

Modified: lldb/trunk/source/Target/Queue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Queue.cpp?rev=197541&r1=197540&r2=197541&view=diff
==============================================================================
--- lldb/trunk/source/Target/Queue.cpp (original)
+++ lldb/trunk/source/Target/Queue.cpp Tue Dec 17 18:58:23 2013
@@ -16,11 +16,12 @@ using namespace lldb;
 using namespace lldb_private;
 
 Queue::Queue (ProcessSP process_sp, lldb::queue_id_t queue_id, const char *queue_name) :
-    m_process_wp (process_sp),
+    m_process_wp (),
     m_queue_id (queue_id),
     m_queue_name (queue_name),
     m_enqueued_items()
 {
+    m_process_wp = process_sp;
     m_index_id = process_sp->AssignIndexIDToQueue (queue_id);
 }
 

Modified: lldb/trunk/source/Target/QueueItem.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/QueueItem.cpp?rev=197541&r1=197540&r2=197541&view=diff
==============================================================================
--- lldb/trunk/source/Target/QueueItem.cpp (original)
+++ lldb/trunk/source/Target/QueueItem.cpp Tue Dec 17 18:58:23 2013
@@ -14,10 +14,11 @@ using namespace lldb;
 using namespace lldb_private;
 
 QueueItem::QueueItem (QueueSP queue_sp) :
-    m_queue_wp (queue_sp),
+    m_queue_wp (),
     m_kind (eQueueItemKindUnknown),
     m_address ()
 {
+    m_queue_wp = queue_sp;
 }
 
 QueueItem::~QueueItem ()





More information about the lldb-commits mailing list