Stop using conditional catch statements

It is a mozilla extension that is going away in SpiderMonkey 60.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/151
This commit is contained in:
Florian Müllner
2018-07-15 03:17:42 +02:00
committed by Florian Müllner
parent 22392d1328
commit e36ba874a8
4 changed files with 39 additions and 28 deletions

View File

@ -216,12 +216,14 @@ function _step(g, finish, onError) {
if (onError)
onError(err);
});
} catch (err if err instanceof StopIteration) {
if (finish)
finish();
} catch (err) {
if (onError)
onError(err);
if (err instanceof StopIteration) {
if (finish)
finish();
} else {
if (onError)
onError(err);
}
}
}