Bind methods instead of using eval

Reviewed By: astreet

Differential Revision: D3417452

fbshipit-source-id: 437daa2dfcd01efb749465a94c1a72ce8a2cb315
This commit is contained in:
Alexander Blom
2016-06-21 10:08:31 -07:00
committed by Facebook Github Bot 0
parent cd542f0656
commit d63d4f0e9c
9 changed files with 101 additions and 49 deletions

View File

@@ -914,8 +914,14 @@ import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_JAVA_BRIDGE;
return null;
}
}).get();
} catch (InterruptedException | ExecutionException e) {
} catch (InterruptedException e) {
throw new RuntimeException(e);
} catch (ExecutionException e) {
if (e.getCause() instanceof RuntimeException) {
throw (RuntimeException) e.getCause();
} else {
throw new RuntimeException(e);
}
}
return reactContext;