mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 784404 - Intermittent assertion in dom/devicestorage/test/test_basic.html. r=bent
This commit is contained in:
parent
fc14088df0
commit
cfa68bef6d
@ -49,11 +49,17 @@ private:
|
||||
nsresult rv = NS_OK;
|
||||
if (!mCanceled) {
|
||||
rv = CancelableRun();
|
||||
mParent->RemoveRunnable(this);
|
||||
|
||||
nsCOMPtr<nsIRunnable> event = NS_NewRunnableMethod(this, &CancelableRunnable::RemoveRunnable);
|
||||
NS_DispatchToMainThread(event);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
void RemoveRunnable() {
|
||||
mParent->RemoveRunnable(this);
|
||||
}
|
||||
|
||||
void Cancel() {
|
||||
mCanceled = true;
|
||||
}
|
||||
@ -184,9 +190,11 @@ private:
|
||||
|
||||
protected:
|
||||
void AddRunnable(CancelableRunnable* aRunnable) {
|
||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||
mRunnables.AppendElement(aRunnable);
|
||||
}
|
||||
void RemoveRunnable(CancelableRunnable* aRunnable) {
|
||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||
mRunnables.RemoveElement(aRunnable);
|
||||
}
|
||||
nsTArray<nsRefPtr<CancelableRunnable> > mRunnables;
|
||||
|
Loading…
Reference in New Issue
Block a user