Skip to content

Commit

Permalink
Do not call onLoadLibraryEnd if onLoadLibraryStart failed
Browse files Browse the repository at this point in the history
Summary: .

Differential Revision: D54245030

fbshipit-source-id: 3b8a2e4dd1828cc57a58c0f32c531674057a14d3
  • Loading branch information
michalgr authored and facebook-github-bot committed Mar 7, 2024
1 parent 0f97bdd commit 57f2556
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions java/com/facebook/soloader/SoLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -778,10 +778,10 @@ public static boolean loadLibrary(String shortName, int loadFlags) throws Unsati
@SuppressLint({"CatchGeneralException", "EmptyCatchBlock"})
private static boolean loadLibraryOnAndroid(String shortName, int loadFlags) {
@Nullable Throwable failure = null;
String mergedLibName = MergedSoMapping.mapLibName(shortName);
String soName = mergedLibName != null ? mergedLibName : shortName;
ObserverHolder.onLoadLibraryStart(shortName, mergedLibName, loadFlags);
try {
String mergedLibName = MergedSoMapping.mapLibName(shortName);
String soName = mergedLibName != null ? mergedLibName : shortName;
ObserverHolder.onLoadLibraryStart(shortName, mergedLibName, loadFlags);
return loadLibraryBySoName(
System.mapLibraryName(soName), shortName, mergedLibName, loadFlags, null);
} catch (Throwable t) {
Expand Down

0 comments on commit 57f2556

Please sign in to comment.