already_AddRefed<Promise> CacheStorage::Keys(ErrorResult& aRv) { NS_ASSERT_OWNINGTHREAD(CacheStorage); if (NS_WARN_IF(NS_FAILED(mStatus))) { aRv.Throw(mStatus); return nullptr; } RefPtr<Promise> promise = Promise::Create(mGlobal, aRv); if (NS_WARN_IF(!promise)) { return nullptr; } nsAutoPtr<Entry> entry(new Entry()); entry->mPromise = promise; entry->mArgs = StorageKeysArgs(); mPendingRequests.AppendElement(entry.forget()); MaybeRunPendingRequests(); return promise.forget(); }
already_AddRefed<Promise> CacheStorage::Keys(ErrorResult& aRv) { NS_ASSERT_OWNINGTHREAD(CacheStorage); if (mFailedActor) { aRv.Throw(NS_ERROR_UNEXPECTED); return nullptr; } nsRefPtr<Promise> promise = Promise::Create(mGlobal, aRv); if (!promise) { return nullptr; } nsAutoPtr<Entry> entry(new Entry()); entry->mPromise = promise; entry->mArgs = StorageKeysArgs(); mPendingRequests.AppendElement(entry.forget()); MaybeRunPendingRequests(); return promise.forget(); }
MainThreadFetchResolver::~MainThreadFetchResolver() { NS_ASSERT_OWNINGTHREAD(MainThreadFetchResolver); }
CacheStorageChild::~CacheStorageChild() { MOZ_COUNT_DTOR(cache::CacheStorageChild); NS_ASSERT_OWNINGTHREAD(CacheStorageChild); MOZ_ASSERT(!mListener); }
void FetchStream::AssertIsOnOwningThread() { NS_ASSERT_OWNINGTHREAD(FetchStream); }
nsXPInstallManager::~nsXPInstallManager() { NS_ASSERT_OWNINGTHREAD(nsXPInstallManager); NS_ASSERTION(!mTriggers, "Shutdown not called, triggers still alive"); }
WorkerHolderToken::~WorkerHolderToken() { NS_ASSERT_OWNINGTHREAD(WorkerHolderToken); MOZ_ASSERT(mListenerList.IsEmpty()); }
WorkerPrivate* WorkerHolderToken::GetWorkerPrivate() const { NS_ASSERT_OWNINGTHREAD(WorkerHolderToken); return mWorkerPrivate; }
void Promise::MaybeReject(const RefPtr<MediaStreamError>& aArg) { NS_ASSERT_OWNINGTHREAD(Promise); MaybeSomething(aArg, &Promise::MaybeReject); }
CachePushStreamChild::~CachePushStreamChild() { NS_ASSERT_OWNINGTHREAD(CachePushStreamChild); MOZ_ASSERT(mClosed); MOZ_ASSERT(!mCallback); }
void CacheStorage::AssertOwningThread() const { NS_ASSERT_OWNINGTHREAD(CacheStorage); }
WorkerHolder::~WorkerHolder() { NS_ASSERT_OWNINGTHREAD(WorkerHolder); ReleaseWorkerInternal(); MOZ_ASSERT(mWorkerPrivate == nullptr); }
void gfxReusableImageSurfaceWrapper::ReadLock() { NS_ASSERT_OWNINGTHREAD(gfxReusableImageSurfaceWrapper); AddRef(); }
int32_t gfxMemorySharedReadLock::GetReadCount() { NS_ASSERT_OWNINGTHREAD(gfxMemorySharedReadLock); return mReadCount; }