Example #1
0
 void MozillaUnRegisterDebugFD(int fd) {
     MyAutoLock lockedScope;
     std::vector<int> &Vec = getDebugFDs();
     std::vector<int>::iterator i = std::find(Vec.begin(), Vec.end(), fd);
     MOZ_ASSERT(i != Vec.end());
     Vec.erase(i);
 }
void DisableWritePoisoning() {
  if (sPoisoningState != POISON_ON)
    return;

  sPoisoningState = POISON_OFF;
  PL_strfree(sProfileDirectory);
  sProfileDirectory = nullptr;

  PRLock *Lock;
  {
    DebugFDAutoLock lockedScope;
    delete getDebugFDs();
    Lock = DebugFDAutoLock::getDebugFDsLock();
    DebugFDAutoLock::Clear();
  }
  PR_DestroyLock(Lock);
}
Example #3
0
 void MozillaRegisterDebugFD(int fd) {
     MyAutoLock lockedScope;
     std::vector<int> &Vec = getDebugFDs();
     MOZ_ASSERT(std::find(Vec.begin(), Vec.end(), fd) == Vec.end());
     Vec.push_back(fd);
 }
bool IsDebugFD(int fd) {
  DebugFDAutoLock lockedScope;

  std::vector<int> &Vec = *getDebugFDs();
  return std::find(Vec.begin(), Vec.end(), fd) != Vec.end();
}