+ numerator = original_numerator + numUnits();
+
+ if (callback != null)
+ try {
+ callback.call(Context.enter(), null, null, new Object[] { new Double(numerator), new Double(denominator) });
+ } catch (EcmaError e) {
+ if (Log.on) Log.log(this, "WARNING: uncaught interpreter exception: " + e.getMessage());
+ if (Log.on) Log.log(this, " thrown from within progress callback at " + e.getSourceName() + ":" + e.getLineNumber());
+ } catch (JavaScriptException e) {
+ if (Log.on) Log.log(this, "WARNING: uncaught ecmascript exception: " + e.getMessage());
+ if (Log.on) Log.log(this, " thrown from within progress callback at " + e.sourceFile + ":" + e.line);
+ }
+
+ if (Thread.currentThread() instanceof ThreadMessage) try {
+ XWT.yield.call(Context.enter(), null, null, null);
+ } catch (JavaScriptException e) {
+ if (Log.on) Log.log(this, "WARNING: uncaught ecmascript exception: " + e.getMessage());
+ if (Log.on) Log.log(this, " thrown from within yield at " + e.sourceFile + ":" + e.line);
+ }