Skip to content

Commit

Permalink
Try the debug executor before the release executor
Browse files Browse the repository at this point in the history
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
  • Loading branch information
willholen authored and alloy committed Mar 5, 2020
1 parent e16c5cb commit 409551c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
}

Expand Down

0 comments on commit 409551c

Please sign in to comment.