mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-06 09:31:11 +08:00
Rename "js-bundles" to "js-segments"
Differential Revision: D6244399 fbshipit-source-id: d1606d126e3b598b19fa8a0955438c8dec76f5d0
This commit is contained in:
committed by
Facebook Github Bot
parent
26038f50bb
commit
f1258181ee
@@ -210,8 +210,8 @@ public class CatalystInstanceImpl implements CatalystInstance {
|
||||
jniSetSourceURL(remoteURL);
|
||||
}
|
||||
|
||||
/* package */ void setJsBundlesDirectory(String directoryPath) {
|
||||
jniSetJsBundlesDirectory(directoryPath);
|
||||
/* package */ void setJsSegmentsDirectory(String directoryPath) {
|
||||
jniSetJsSegmentsDirectory(directoryPath);
|
||||
}
|
||||
|
||||
/* package */ void loadScriptFromAssets(AssetManager assetManager, String assetURL, boolean loadSynchronously) {
|
||||
@@ -225,7 +225,7 @@ public class CatalystInstanceImpl implements CatalystInstance {
|
||||
}
|
||||
|
||||
private native void jniSetSourceURL(String sourceURL);
|
||||
private native void jniSetJsBundlesDirectory(String directoryPath);
|
||||
private native void jniSetJsSegmentsDirectory(String directoryPath);
|
||||
private native void jniLoadScriptFromAssets(AssetManager assetManager, String assetURL, boolean loadSynchronously);
|
||||
private native void jniLoadScriptFromFile(String fileName, String sourceURL, boolean loadSynchronously);
|
||||
|
||||
|
||||
@@ -97,15 +97,15 @@ public abstract class JSBundleLoader {
|
||||
}
|
||||
|
||||
/**
|
||||
* This loader is used to wrap other loaders and set js bundles directory before executing
|
||||
* This loader is used to wrap other loaders and set js segments directory before executing
|
||||
* application script.
|
||||
*/
|
||||
public static JSBundleLoader createSplitBundlesLoader(
|
||||
final String jsBundlesDirectory, final JSBundleLoader delegate) {
|
||||
final String jsSegmentsDirectory, final JSBundleLoader delegate) {
|
||||
return new JSBundleLoader() {
|
||||
@Override
|
||||
public String loadScript(CatalystInstanceImpl instance) {
|
||||
instance.setJsBundlesDirectory(jsBundlesDirectory);
|
||||
instance.setJsSegmentsDirectory(jsSegmentsDirectory);
|
||||
return delegate.loadScript(instance);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user