зеркало из https://github.com/mozilla/gecko-dev.git
Added nsIRegistry::Flush (bug 16283, required for 16600), r=shaver
This commit is contained in:
Родитель
c394df3115
Коммит
99d183d043
|
@ -35,6 +35,7 @@ interface nsIRegistry : nsISupports
|
|||
void openWellKnownRegistry(in long regid);
|
||||
void openDefault();
|
||||
void close();
|
||||
void flush();
|
||||
boolean isOpen();
|
||||
|
||||
string getString(in nsRegistryKey baseKey, in string path);
|
||||
|
|
|
@ -475,6 +475,19 @@ NS_IMETHODIMP nsRegistry::Close() {
|
|||
return regerr2nsresult( err );
|
||||
}
|
||||
|
||||
/*----------------------------- nsRegistry::Flush ------------------------------
|
||||
| Flushes the registry via NR_RegFlush. |
|
||||
------------------------------------------------------------------------------*/
|
||||
NS_IMETHODIMP nsRegistry::Flush() {
|
||||
REGERR err = REGERR_FAIL;
|
||||
if( mReg ) {
|
||||
PR_Lock(mregLock);
|
||||
err = NR_RegFlush( mReg );
|
||||
PR_Unlock(mregLock);
|
||||
}
|
||||
return regerr2nsresult( err );
|
||||
}
|
||||
|
||||
/*----------------------------- nsRegistry::IsOpen -----------------------------
|
||||
| Tests the mReg handle and returns whether the registry is open or not. |
|
||||
------------------------------------------------------------------------------*/
|
||||
|
|
|
@ -35,6 +35,7 @@ interface nsIRegistry : nsISupports
|
|||
void openWellKnownRegistry(in long regid);
|
||||
void openDefault();
|
||||
void close();
|
||||
void flush();
|
||||
boolean isOpen();
|
||||
|
||||
string getString(in nsRegistryKey baseKey, in string path);
|
||||
|
|
|
@ -475,6 +475,19 @@ NS_IMETHODIMP nsRegistry::Close() {
|
|||
return regerr2nsresult( err );
|
||||
}
|
||||
|
||||
/*----------------------------- nsRegistry::Flush ------------------------------
|
||||
| Flushes the registry via NR_RegFlush. |
|
||||
------------------------------------------------------------------------------*/
|
||||
NS_IMETHODIMP nsRegistry::Flush() {
|
||||
REGERR err = REGERR_FAIL;
|
||||
if( mReg ) {
|
||||
PR_Lock(mregLock);
|
||||
err = NR_RegFlush( mReg );
|
||||
PR_Unlock(mregLock);
|
||||
}
|
||||
return regerr2nsresult( err );
|
||||
}
|
||||
|
||||
/*----------------------------- nsRegistry::IsOpen -----------------------------
|
||||
| Tests the mReg handle and returns whether the registry is open or not. |
|
||||
------------------------------------------------------------------------------*/
|
||||
|
|
Загрузка…
Ссылка в новой задаче