Skip to content

Commit

Permalink
Retry native library load if tracing before SoLoader initialized
Browse files Browse the repository at this point in the history
Reviewed By: johnbillings3

Differential Revision: D19083419

fbshipit-source-id: 01d1fa2a6e61911312d3ff3481f9c33637d59083
  • Loading branch information
nslingerland authored and facebook-github-bot committed Dec 18, 2019
1 parent 4b66ec5 commit 3f60655
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion java/com/facebook/soloader/SoLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public class SoLoader {
@Nullable
private static SoSource[] sSoSources = null;

private static int sSoSourcesVersion = 0;
private static volatile int sSoSourcesVersion = 0;

/** A backup SoSources to try if a lib file is corrupted */
@GuardedBy("sSoSourcesLock")
Expand Down Expand Up @@ -866,6 +866,10 @@ private static void assertInitialized() {
}
}

public static int getSoSourcesVersion() {
return sSoSourcesVersion;
}

/**
* Add a new source of native libraries. SoLoader consults the new source before any
* currently-installed source.
Expand Down

0 comments on commit 3f60655

Please sign in to comment.