Skip to content

Commit 6ec5aa1

Browse files
committed
Remove workaround for passing functional interfaces to @js methods
1 parent 29c0e23 commit 6ec5aa1

File tree

1 file changed

+0
-11
lines changed
  • native-image/wasm-javac/src/main/java/com/example

1 file changed

+0
-11
lines changed

native-image/wasm-javac/src/main/java/com/example/WebMain.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,6 @@ public class WebMain {
3737
public static void main(String[] args) {
3838
// Ensure file manager is initialized
3939
JavacCompilerWrapper.getFm();
40-
try {
41-
// TODO GR-62854 Here to ensure handleEvent and run is generated. Remove once objects
42-
// passed to @JS methods automatically have their SAM registered.
43-
sink(EventHandler.class.getDeclaredMethod("handleEvent", JSObject.class));
44-
sink(Runnable.class.getDeclaredMethod("run"));
45-
} catch (NoSuchMethodException e) {
46-
throw new RuntimeException(e);
47-
}
4840

4941
addEventListener(COMPILE_BUTTON, "click", e -> compileCallback());
5042
addEventListener(INPUT, "keydown", e -> {
@@ -67,9 +59,6 @@ private static void compileCallback() {
6759
});
6860
}
6961

70-
@JS("")
71-
private static native void sink(Object o);
72-
7362
/**
7463
* Runs the given {@link Runnable} in {@code setTimeout} without delay.
7564
* <p>

0 commit comments

Comments
 (0)