Skip unnecessary string allocs from frquently executed code paths.

Differential Revision: D2540814

fb-gh-sync-id: 045d012b52a6bc89d409bcc028532da1760c5775
This commit is contained in:
Krzysztof Magiera
2015-10-14 09:23:25 -07:00
committed by facebook-github-bot-6
parent aae9f0255f
commit 10a9b94b9c
3 changed files with 20 additions and 9 deletions
@@ -66,7 +66,9 @@ class JavaScriptModuleRegistration {
public int getMethodId(Method method) {
final Integer id = mMethodsToIds.get(method);
Assertions.assertNotNull(id, "Unknown method: " + method.getName());
if (id == null) {
Assertions.assertUnreachable("Unknown method: " + method.getName());
}
return id.intValue();
}