File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
gwt-core/src/main/java/org/gwtproject/core/client Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 1717
1818import elemental2 .dom .DomGlobal ;
1919import elemental2 .dom .Window ;
20+ import jsinterop .annotations .JsFunction ;
2021import jsinterop .annotations .JsMethod ;
2122import jsinterop .annotations .JsType ;
2223import jsinterop .base .Js ;
@@ -58,11 +59,10 @@ public static <T> T create(Class<?> clazz) {
5859 public static void reportUncaughtException (Throwable e ) {
5960 // throw an exception "later" so that it ends up handled by the global
6061 // error handler. Same code as in GWT2's Impl.reportToBrowser()
61- DomGlobal .setTimeout (
62- ignore -> {
63- throw_ (e );
64- },
65- 0 );
62+ setTimeout (
63+ () -> {
64+ throw (e );
65+ });
6666 }
6767
6868 /**
@@ -160,8 +160,13 @@ private static class InnerWindow {
160160 static Window window ;
161161 }
162162
163- @ JsMethod (namespace = "<window>" , name = "throw" )
164- private static native void throw_ (Object object );
163+ @ JsFunction
164+ private interface Throwing {
165+ void run () throws Throwable ;
166+ }
167+
168+ @ JsMethod (namespace = "<window>" , name = "setTimeout" )
169+ private static native void setTimeout (Throwing throwingFunction );
165170
166171 public static boolean isClient () {
167172 return org .gwtproject .core .shared .GWT .isClient ();
You can’t perform that action at this time.
0 commit comments