VirtualBox

Changeset 101777 in vbox for trunk


Ignore:
Timestamp:
Nov 4, 2023 6:26:43 PM (16 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
159873
Message:

libs/xpcom: Remove all code associated with GC_LEAK_DETECTOR as it is never set in our case, bugref:10545

Location:
trunk/src/libs/xpcom18a4
Files:
2 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/nsprpub/pr/include/private/primpl.h

    r101773 r101777  
    200200                (thr->interrupt_blocked = 0)
    201201
    202 #ifdef GC_LEAK_DETECTOR
    203 /* All threads are GCable. */
    204 #define _PT_IS_GCABLE_THREAD(thr) 1
    205 #else
    206202#define _PT_IS_GCABLE_THREAD(thr) ((thr)->state & PT_THREAD_GCABLE)
    207 #endif /* GC_LEAK_DETECTOR */
    208203
    209204/*
     
    651646#endif
    652647
    653 #ifdef GC_LEAK_DETECTOR
    654 /* All threads are GCable. */
    655 #define _PR_IS_GCABLE_THREAD(thr) 1
    656 #else
    657648#define _PR_IS_GCABLE_THREAD(thr) ((thr)->flags & _PR_GCABLE_THREAD)
    658 #endif /* GC_LEAK_DETECTOR */
    659649
    660650#define _PR_PENDING_INTERRUPT(thr)                                      \
     
    18021792extern void _PR_LogCleanup(void);
    18031793extern void _PR_InitLayerCache(void);
    1804 #ifdef GC_LEAK_DETECTOR
    1805 extern void _PR_InitGarbageCollector(void);
    1806 #endif
    18071794
    18081795extern PRBool _pr_initialized;
  • trunk/src/libs/xpcom18a4/nsprpub/pr/src/misc/prinit.c

    r101773 r101777  
    213213    PR_ASSERT(NULL != _pr_sleeplock);
    214214
    215 #ifdef GC_LEAK_DETECTOR
    216     _PR_InitGarbageCollector();
    217 #endif
    218 
    219215    _PR_InitThreads(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
    220 
    221 #ifdef WIN16
    222         {
    223         PRInt32 top;   /* artificial top of stack, win16 */
    224     _pr_top_of_task_stack = (char *) ⊤
    225         }
    226 #endif
    227216
    228217#ifndef _PR_GLOBAL_THREADS_ONLY
  • trunk/src/libs/xpcom18a4/nsprpub/pr/src/pthreads/ptthread.c

    r101773 r101777  
    102102#endif
    103103
    104 #if defined(GC_LEAK_DETECTOR) && (__GLIBC__ >= 2) && defined(__i386__)
    105 
    106 #include <setjmp.h>
    107 
    108 typedef struct stack_frame stack_frame;
    109 
    110 struct stack_frame {
    111     stack_frame* next;
    112     void* pc;
    113 };
    114 
    115 static stack_frame* GetStackFrame()
    116 {
    117     jmp_buf jb;
    118     stack_frame* currentFrame;
    119     setjmp(jb);
    120     currentFrame = (stack_frame*)(jb[0].__jmpbuf[JB_BP]);
    121     currentFrame = currentFrame->next;
    122     return currentFrame;
    123 }
    124 
    125 static void* GetStackTop()
    126 {
    127     stack_frame* frame;
    128     frame = GetStackFrame();
    129     while (frame != NULL)
    130     {
    131         ptrdiff_t pc = (ptrdiff_t)frame->pc;
    132         if ((pc < 0x08000000) || (pc > 0x7fffffff) || (frame->next < frame))
    133             return frame;
    134         frame = frame->next;
    135     }
    136     return NULL;
    137 }
    138 #endif /* GC_LEAK_DETECTOR && (__GLIBC__ >= 2) && __i386__ */
    139 
    140104/*
    141105** Initialize a stack for a native pthread thread
     
    154118        ts->stackTop = ts->allocBase;
    155119#else
    156 #ifdef GC_LEAK_DETECTOR
    157         ts->stackTop    = GetStackTop();
    158         ts->stackBottom = ts->stackTop - ts->stackSize;
    159 #else
    160120        ts->stackTop    = ts->allocBase;
    161121        ts->stackBottom = ts->allocBase - ts->stackSize;
    162 #endif
    163122#endif
    164123    }
  • trunk/src/libs/xpcom18a4/xpcom/base/nsTraceRefcntImpl.cpp

    r64625 r101777  
    584584static PRInt32 GetSerialNumber(void* aPtr, PRBool aCreate)
    585585{
    586 #ifdef GC_LEAK_DETECTOR
    587   // need to disguise this pointer, so the table won't keep the object alive.
    588   aPtr = (void*) ~PLHashNumber(aPtr);
    589 #endif
    590586  PLHashEntry** hep = PL_HashTableRawLookup(gSerialNumbers, PLHashNumber(NS_PTR_TO_INT32(aPtr)), aPtr);
    591587  if (hep && *hep) {
     
    607603static PRInt32* GetRefCount(void* aPtr)
    608604{
    609 #ifdef GC_LEAK_DETECTOR
    610   // need to disguise this pointer, so the table won't keep the object alive.
    611   aPtr = (void*) ~PLHashNumber(aPtr);
    612 #endif
    613605  PLHashEntry** hep = PL_HashTableRawLookup(gSerialNumbers, PLHashNumber(NS_PTR_TO_INT32(aPtr)), aPtr);
    614606  if (hep && *hep) {
     
    621613static PRInt32* GetCOMPtrCount(void* aPtr)
    622614{
    623 #ifdef GC_LEAK_DETECTOR
    624   // need to disguise this pointer, so the table won't keep the object alive.
    625   aPtr = (void*) ~PLHashNumber(aPtr);
    626 #endif
    627615  PLHashEntry** hep = PL_HashTableRawLookup(gSerialNumbers, PLHashNumber(NS_PTR_TO_INT32(aPtr)), aPtr);
    628616  if (hep && *hep) {
     
    635623static void RecycleSerialNumberPtr(void* aPtr)
    636624{
    637 #ifdef GC_LEAK_DETECTOR
    638   // need to disguise this pointer, so the table won't keep the object alive.
    639   aPtr = (void*) ~PLHashNumber(aPtr);
    640 #endif
    641625  PL_HashTableRemove(gSerialNumbers, aPtr);
    642626}
  • trunk/src/libs/xpcom18a4/xpcom/build/nsXPComInit.cpp

    r28992 r101777  
    110110#include "nsVariant.h"
    111111
    112 #ifdef GC_LEAK_DETECTOR
    113 #include "nsLeakDetector.h"
    114 #endif
    115112#include "nsRecyclingAllocator.h"
    116113
     
    634631    if (NS_FAILED(rv)) return rv;
    635632
    636 #ifdef GC_LEAK_DETECTOR
    637   rv = NS_InitLeakDetector();
    638     if (NS_FAILED(rv)) return rv;
    639 #endif
    640 
    641633    // 2. Register the global services with the component manager so that
    642634    //    clients can create new objects.
     
    970962    nsTraceRefcntImpl::ResetStatistics();
    971963    nsTraceRefcntImpl::Shutdown();
    972 #endif
    973 
    974 #ifdef GC_LEAK_DETECTOR
    975     // Shutdown the Leak detector.
    976     NS_ShutdownLeakDetector();
    977964#endif
    978965
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette