Try the debug executor before the release executor

Summary:
We are currently unintentionally including both libhermes-executor-release.so
and libhermes-executor-debug.so in all OSS RN builds.

RN tries both in turn, but since they both exist and the release executor is compatible
with the debug build, we always get the release executor without debug functionality.

While we sort this out, switch the load order. Since the debug executor is not compatible
with the release build, so it'll fail to load and try the next one.

ChangeLog: [Android] Fix Hermes debugger being disabled by default

Reviewed By: mhorowitz

Differential Revision: D20163828

fbshipit-source-id: ee4d87f40e42a7c8eedfdb7e1fc17eb3e5966ba5
This commit is contained in:
Will Holen
2020-03-05 12:14:59 +01:00
committed by Eloy Durán
parent e16c5cb4bf
commit 409551ccd2
@@ -19,11 +19,11 @@ public class HermesExecutor extends JavaScriptExecutor {
// libhermes must be loaded explicitly to invoke its JNI_OnLoad.
SoLoader.loadLibrary("hermes");
try {
SoLoader.loadLibrary("hermes-executor-release");
mode_ = "Release";
} catch (UnsatisfiedLinkError e) {
SoLoader.loadLibrary("hermes-executor-debug");
mode_ = "Debug";
} catch (UnsatisfiedLinkError e) {
SoLoader.loadLibrary("hermes-executor-release");
mode_ = "Release";
}
}