mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Decouple JSBundleLoader from CatalystInstanceImpl
Summary: Right now JSBundleLoader is tightly coupled to CatalystInstanceImpl; this diffs adds an interface, JSBundleLoaderDelegate, that CatalystInstanceImpl implements so that we can use the bundle loader with other classes. Reviewed By: mdvacca Differential Revision: D13216752 fbshipit-source-id: fc406ef30f12ed9d3ed13a062dedd7b33f3b7985
This commit is contained in:
committed by
Facebook Github Bot
parent
668341a294
commit
a2ead1c7b5
@@ -50,10 +50,10 @@ public final class FallbackJSBundleLoader extends JSBundleLoader {
|
||||
* it is replaced by the next most preferred loader.
|
||||
*/
|
||||
@Override
|
||||
public String loadScript(CatalystInstanceImpl instance) {
|
||||
public String loadScript(JSBundleLoaderDelegate delegate) {
|
||||
while (true) {
|
||||
try {
|
||||
return getDelegateLoader().loadScript(instance);
|
||||
return getDelegateLoader().loadScript(delegate);
|
||||
} catch (Exception e) {
|
||||
if (e.getMessage() == null || !e.getMessage().startsWith(RECOVERABLE)) {
|
||||
throw e;
|
||||
|
||||
Reference in New Issue
Block a user