/** * Methods fe(...) should be used from asynchronous contexts so as we can * catch the exception and send it to the GWT UncaughtExceptionHandler * They are intentionally final to avoid override them. */ public final void fe(Object arg) { fe(new Object[] {arg}); }
/** * Methods fe(...) should be used from asynchronous contexts so as we can * catch the exception and send it to the GWT UncaughtExceptionHandler. * They are intentionally final to avoid override them */ public final void fe() { fe(arguments); }
public boolean fire(Event event, Object[] eventData) { if (times != 0) { times--; Object[] arguments; eventData = eventData != null ? eventData : new Object[0]; // The argument of the function will be first the data attached to the handler then the // data attached to the event. if (data != null) { Object[] handlerData = data.getClass().isArray() ? (Object[]) data : new Object[]{data}; arguments = new Object[handlerData.length + eventData.length]; System.arraycopy(handlerData, 0, arguments, 0, handlerData.length); System.arraycopy(eventData, 0, arguments, handlerData.length, eventData.length); } else { arguments = eventData; } // FIXME(manolo): figure out when this is null, and fix or comment it. if (function != null) { return function.fe(event, arguments); } } return true; }
private void runNext(Element elem, String name, Queue<? extends Function> q) { assert q != null; Function f = q.peek(); if (f != null) { f.fe(elem); } else { // Run final hooks when emptying the queue, used in promises emptyHooks(elem, name).fire(); // It is the last function, remove the queue to avoid leaks (issue 132) removeData(elem, name); removeData(elem, name + EMPTY_HOOKS); } }