mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-02 06:22:20 +00:00
Bug 1298676 - part 1 - add IOInterposer::Enable(); r=aklotz
In some parts of the crash reporter, we need to disable I/O interposition, then turn it back on. We didn't have a function for re-enabling the I/O interposer...until now.
This commit is contained in:
parent
ab64f4b67c
commit
9d007ffa3e
@ -186,6 +186,7 @@ public:
|
||||
}
|
||||
|
||||
inline void Disable() { mIsEnabled = false; }
|
||||
inline void Enable() { mIsEnabled = true; }
|
||||
|
||||
void Register(IOInterposeObserver::Operation aOp,
|
||||
IOInterposeObserver* aObserver)
|
||||
@ -481,6 +482,15 @@ IOInterposer::Disable()
|
||||
sMasterList->Disable();
|
||||
}
|
||||
|
||||
void
|
||||
IOInterposer::Enable()
|
||||
{
|
||||
if (!sMasterList) {
|
||||
return;
|
||||
}
|
||||
sMasterList->Enable();
|
||||
}
|
||||
|
||||
void
|
||||
IOInterposer::Report(IOInterposeObserver::Observation& aObservation)
|
||||
{
|
||||
|
@ -171,6 +171,12 @@ void Clear();
|
||||
*/
|
||||
void Disable();
|
||||
|
||||
/**
|
||||
* This function re-enables IOInterposer functionality in a fast, thread-safe
|
||||
* manner. Primarily for use by the crash reporter.
|
||||
*/
|
||||
void Enable();
|
||||
|
||||
/**
|
||||
* Report IO to registered observers.
|
||||
* Notice that the reported operation must be either OpRead, OpWrite or
|
||||
|
Loading…
x
Reference in New Issue
Block a user