VirtualBox

Changeset 101905 in vbox


Ignore:
Timestamp:
Nov 6, 2023 9:08:40 PM (15 months ago)
Author:
vboxsync
Message:

libs/xpcom: Remove unused code from nsprpub, bugref:10545

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

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/Makefile.kmk

    r101903 r101905  
    170170        nsprpub/pr/include/prbit.h \
    171171        nsprpub/pr/include/prclist.h \
    172         nsprpub/pr/include/prcmon.h \
    173172        nsprpub/pr/include/prcvar.h \
    174173        nsprpub/pr/include/prdtoa.h \
     
    500499        nsprpub/pr/src/misc/prlong.c \
    501500        nsprpub/pr/src/misc/prtime.c \
    502         nsprpub/pr/src/threads/prcmon.c \
    503501        nsprpub/pr/src/threads/prtpd.c \
    504502        nsprpub/lib/ds/plarena.c \
  • trunk/src/libs/xpcom18a4/nsprpub/pr/include/nspr.h

    r101903 r101905  
    4242#include "prbit.h"
    4343#include "prclist.h"
    44 #include "prcmon.h"
    4544#include "prcvar.h"
    4645#include "prdtoa.h"
  • trunk/src/libs/xpcom18a4/nsprpub/pr/include/private/primpl.h

    r101901 r101905  
    511511extern void _PR_InitMem(void);
    512512extern void _PR_InitEnv(void);
    513 extern void _PR_InitCMon(void);
    514513extern void _PR_InitIO(void);
    515514extern void _PR_InitLog(void);
  • trunk/src/libs/xpcom18a4/nsprpub/pr/src/misc/prinit.c

    r101891 r101905  
    161161    _PR_InitThreads(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
    162162
    163     _PR_InitCMon();
    164163    _PR_InitIO();
    165164    _PR_InitLog();
  • trunk/src/libs/xpcom18a4/xpcom/threads/nsAutoLock.cpp

    r1 r101905  
    163163        OrderTable = 0;
    164164    }
    165     PR_CSetOnMonitorRecycle(OnMonitorRecycle);
    166165}
    167166
     
    172171
    173172    // Called at shutdown, so we don't need to lock.
    174     PR_CSetOnMonitorRecycle(0);
    175173    PR_DestroyLock(OrderTableLock);
    176174    OrderTableLock = 0;
     
    408406}
    409407
    410 // XXX we don't worry about cached monitors being destroyed behind our back.
    411 // XXX current NSPR (mozilla/nsprpub/pr/src/threads/prcmon.c) never destroys
    412 // XXX a cached monitor! potential resource pig in conjunction with necko...
    413 
    414 void nsAutoCMonitor::Enter()
    415 {
    416 #ifdef DEBUG
    417     nsAutoLockBase* stackTop =
    418         (nsAutoLockBase*) PR_GetThreadPrivate(LockStackTPI);
    419     NS_ASSERTION(stackTop == mDown, "non-LIFO nsAutoCMonitor::Enter");
    420     mDown = stackTop;
    421     (void) PR_SetThreadPrivate(LockStackTPI, this);
    422 #endif
    423     PR_CEnterMonitor(mLockObject);
    424     mLockCount += 1;
    425 }
    426 
    427 void nsAutoCMonitor::Exit()
    428 {
    429 #ifdef DEBUG
    430     (void) PR_SetThreadPrivate(LockStackTPI, mDown);
    431 #endif
    432     PRStatus status = PR_CExitMonitor(mLockObject);
    433     NS_ASSERTION(status == PR_SUCCESS, "PR_CExitMonitor failed");
    434     mLockCount -= 1;
    435 }
  • trunk/src/libs/xpcom18a4/xpcom/threads/nsAutoLock.h

    r62330 r101905  
    211211};
    212212
    213 #include "prcmon.h"
     213#include "prmon.h"
    214214#include "nsError.h"
    215215#include "nsDebug.h"
     
    317317};
    318318
    319 ////////////////////////////////////////////////////////////////////////////////
    320 // Once again, this time with a cache...
    321 // (Using this avoids the need to allocate a PRMonitor, which may be useful when
    322 // a large number of objects of the same class need associated monitors.)
    323 
    324 #include "prcmon.h"
    325 #include "nsError.h"
    326 
    327 class NS_COM nsAutoCMonitor : public nsAutoLockBase {
    328 public:
    329     nsAutoCMonitor(void* lockObject)
    330         : nsAutoLockBase(lockObject, eAutoCMonitor),
    331           mLockObject(lockObject), mLockCount(0)
    332     {
    333         NS_ASSERTION(lockObject, "null lock object");
    334         PR_CEnterMonitor(mLockObject);
    335         mLockCount = 1;
    336     }
    337 
    338     ~nsAutoCMonitor() {
    339         if (mLockCount) {
    340 #ifdef DEBUG
    341             PRStatus status =
    342 #endif
    343             PR_CExitMonitor(mLockObject);
    344             NS_ASSERTION(status == PR_SUCCESS, "PR_CExitMonitor failed");
    345         }
    346     }
    347 
    348     void Enter();
    349     void Exit();
    350 
    351     nsresult Wait(PRIntervalTime interval = PR_INTERVAL_NO_TIMEOUT) {
    352         return PR_CWait(mLockObject, interval) == PR_SUCCESS
    353             ? NS_OK : NS_ERROR_FAILURE;
    354     }
    355 
    356     nsresult Notify() {
    357         return PR_CNotify(mLockObject) == PR_SUCCESS
    358             ? NS_OK : NS_ERROR_FAILURE;
    359     }
    360 
    361     nsresult NotifyAll() {
    362         return PR_CNotifyAll(mLockObject) == PR_SUCCESS
    363             ? NS_OK : NS_ERROR_FAILURE;
    364     }
    365 
    366 private:
    367     void*   mLockObject;
    368     PRInt32 mLockCount;
    369 
    370     // Not meant to be implemented. This makes it a compiler error to
    371     // construct or assign an nsAutoLock object incorrectly.
    372     nsAutoCMonitor(void);
    373     nsAutoCMonitor(const nsAutoCMonitor& /*aMon*/);
    374     nsAutoCMonitor& operator =(const nsAutoCMonitor& /*aMon*/);
    375 
    376     // Not meant to be implemented. This makes it a compiler error to
    377     // attempt to create an nsAutoLock object on the heap.
    378     static void* operator new(size_t /*size*/) CPP_THROW_NEW;
    379     static void operator delete(void* /*memory*/);
    380 };
    381 
    382319#endif // nsAutoLock_h__
    383320
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