зеркало из https://github.com/mozilla/pluotsorbet.git
Remove async exception synthetic code.
This commit is contained in:
Родитель
25a6bc01c8
Коммит
fcc61a07ef
|
@ -76,4 +76,8 @@ public final class Sys {
|
|||
* escape hatch for the purpose of testing and profiling.
|
||||
*/
|
||||
public native static void eval(String src);
|
||||
|
||||
public static void throwException(Exception e) throws Exception {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
22
override.js
22
override.js
|
@ -18,25 +18,9 @@ function asyncImpl(returnKind, promise) {
|
|||
}
|
||||
ctx.execute();
|
||||
}, function(exception) {
|
||||
var syntheticMethod = new MethodInfo({
|
||||
name: "RaiseExceptionSynthetic",
|
||||
signature: "()V",
|
||||
isStatic: true,
|
||||
classInfo: J2ME.ClassInfo.createFromObject({
|
||||
className: {value: "java/lang/Object"},
|
||||
vmc: {value: {}},
|
||||
vfc: {value: {}},
|
||||
constant_pool: {value: [
|
||||
null
|
||||
]}
|
||||
}),
|
||||
code: new Uint8Array([
|
||||
0x2a, // aload_0
|
||||
0xbf // athrow
|
||||
])
|
||||
});
|
||||
var callee = Frame.create(syntheticMethod, [exception], 0);
|
||||
ctx.frames.push(callee);
|
||||
var classInfo = CLASSES.getClass("org/mozilla/internal/Sys");
|
||||
var methodInfo = CLASSES.getMethod(classInfo, "S.throwException.(Ljava/lang/Exception;)V");
|
||||
ctx.frames.push(Frame.create(methodInfo, [exception], 0));
|
||||
ctx.execute();
|
||||
});
|
||||
$.pause("Async");
|
||||
|
|
Загрузка…
Ссылка в новой задаче