VirtualBox

Ignore:
Timestamp:
Nov 4, 2023 6:26:43 PM (15 months ago)
Author:
vboxsync
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/nsprpub/pr
Files:
3 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    }
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