GWT 2.x $entry function
Asked Answered
A

1

11

Cannot find any developer information about this function. I just know that it's suggested to wrap JSNI JavaScript calls to Java methods with this $entry function. I found that it catches exceptions so Java code could handle them. Is it all it does?

Aviculture answered 27/3, 2011 at 12:0 Comment(0)
G
14

If you want to know exactly what happens, look into com.google.gwt.core.client.impl.Impl.entry(JavaScriptObject jsFunction).

This function (at least in GWT 2.2.0) mainly calls entry0(Object jsFunction, Object thisObj, Object arguments), which does the following:

  • First, it flushes anything that has been scheduled by Scheduler.scheduleEntry()
  • Then it makes sure to execute the jsFunction in a try block, to forward Exceptions to GWT.getUncaughtExceptionHandler(), if there is such a handler.
  • Finally, it flushes anything that has been scheduled by Scheduler.scheduleFinally()
Generous answered 27/3, 2011 at 12:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.