From 409551ccd2367f8f40a914440054d7a4698196cf Mon Sep 17 00:00:00 2001 From: Will Holen Date: Fri, 28 Feb 2020 15:05:35 -0800 Subject: [PATCH] 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 --- .../com/facebook/hermes/reactexecutor/HermesExecutor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutor.java b/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutor.java index 09c2eee962a172..f2e18746e4b193 100644 --- a/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutor.java +++ b/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutor.java @@ -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"; } }