зеркало из https://github.com/mozilla/gecko-dev.git
Merge m-c to inbound.
This commit is contained in:
Коммит
4b018119c7
|
@ -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;
|
||||
|
|
|
@ -117,10 +117,11 @@ class MarionetteJSTestCase(CommonTestCase):
|
|||
timeout_re = re.compile(r"MARIONETTE_TIMEOUT(\s*)=(\s*)(\d+);")
|
||||
launch_re = re.compile(r"MARIONETTE_LAUNCH_APP(\s*)=(\s*)['|\"](.*?)['|\"];")
|
||||
|
||||
def __init__(self, marionette, methodName='runTest', jsFile=None):
|
||||
def __init__(self, marionette_weakref, methodName='runTest', jsFile=None):
|
||||
assert(jsFile)
|
||||
self.jsFile = jsFile
|
||||
self.marionette = marionette
|
||||
self._marionette_weakref = marionette_weakref
|
||||
self.marionette = None
|
||||
CommonTestCase.__init__(self, methodName)
|
||||
|
||||
def runTest(self):
|
||||
|
|
Загрузка…
Ссылка в новой задаче