зеркало из https://github.com/mozilla/pluotsorbet.git
Support alternate impls that throw VM.Pause or VM.Yield
This commit is contained in:
Родитель
a8bc55af70
Коммит
f08c5ec14e
|
@ -71,7 +71,9 @@ function createAlternateImpl(object, key, fn, opts) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
if (e.name === "TypeError") {
|
if (e === VM.Pause || e === VM.Yield) {
|
||||||
|
throw e;
|
||||||
|
} else if (e.name === "TypeError") {
|
||||||
// JavaScript's TypeError is analogous to a NullPointerException.
|
// JavaScript's TypeError is analogous to a NullPointerException.
|
||||||
ctx.raiseExceptionAndYield("java/lang/NullPointerException", e);
|
ctx.raiseExceptionAndYield("java/lang/NullPointerException", e);
|
||||||
} else if (e.javaClassName) {
|
} else if (e.javaClassName) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче