зеркало из https://github.com/mozilla/pjs.git
Added nsIRegistry::Flush (bug 16283, required for 16600), r=shaver
This commit is contained in:
Родитель
320db26eab
Коммит
89c765707b
|
@ -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. |
|
||||
------------------------------------------------------------------------------*/
|
||||
|
|
Загрузка…
Ссылка в новой задаче