예제 #1
0
DOMStorageManager::~DOMStorageManager()
{
    DOMStorageObserver* observer = DOMStorageObserver::Self();
    if (observer) {
        observer->RemoveSink(this);
    }
}
DOMStorageDBParent::~DOMStorageDBParent()
{
  DOMStorageObserver* observer = DOMStorageObserver::Self();
  if (observer) {
    observer->RemoveSink(this);
  }
}
DOMStorageManager::DOMStorageManager(nsPIDOMStorage::StorageType aType)
  : mType(aType)
{
  mCaches.Init(10);
  DOMStorageObserver* observer = DOMStorageObserver::Self();
  NS_ASSERTION(observer, "No DOMStorageObserver, cannot observe private data delete notifications!");

  if (observer) {
    observer->AddSink(this);
  }
}
예제 #4
0
DOMStorageManager::DOMStorageManager(nsPIDOMStorage::StorageType aType)
    : mCaches(10)
    , mType(aType)
    , mLowDiskSpace(false)
{
    DOMStorageObserver* observer = DOMStorageObserver::Self();
    NS_ASSERTION(observer, "No DOMStorageObserver, cannot observe private data delete notifications!");

    if (observer) {
        observer->AddSink(this);
    }
}
DOMStorageDBParent::DOMStorageDBParent()
: mIPCOpen(false)
{
  DOMStorageObserver* observer = DOMStorageObserver::Self();
  if (observer) {
    observer->AddSink(this);
  }

  // We are always open by IPC only
  AddIPDLReference();

  // Cannot send directly from here since the channel
  // is not completely built at this moment.
  nsRefPtr<SendInitialChildDataRunnable> r =
    new SendInitialChildDataRunnable(this);
  NS_DispatchToCurrentThread(r);
}