mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-04 10:55:04 +08:00
Pass jsc config to JSC
Reviewed By: astreet Differential Revision: D2965497 fb-gh-sync-id: 1aef5a1f2d7ccb8de8ca403e51ebcf247bd6b034 shipit-source-id: 1aef5a1f2d7ccb8de8ca403e51ebcf247bd6b034
This commit is contained in:
committed by
Facebook Github Bot 6
parent
542432fc3e
commit
d032cc967d
@@ -16,8 +16,8 @@ import com.facebook.soloader.SoLoader;
|
||||
public class JSCJavaScriptExecutor extends JavaScriptExecutor {
|
||||
public static class Factory implements JavaScriptExecutor.Factory {
|
||||
@Override
|
||||
public JavaScriptExecutor create() throws Exception {
|
||||
return new JSCJavaScriptExecutor();
|
||||
public JavaScriptExecutor create(WritableNativeMap jscConfig) throws Exception {
|
||||
return new JSCJavaScriptExecutor(jscConfig);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,10 +25,10 @@ public class JSCJavaScriptExecutor extends JavaScriptExecutor {
|
||||
SoLoader.loadLibrary(ReactBridge.REACT_NATIVE_LIB);
|
||||
}
|
||||
|
||||
public JSCJavaScriptExecutor() {
|
||||
initialize();
|
||||
public JSCJavaScriptExecutor(WritableNativeMap jscConfig) {
|
||||
initialize(jscConfig);
|
||||
}
|
||||
|
||||
private native void initialize();
|
||||
private native void initialize(WritableNativeMap jscConfig);
|
||||
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import com.facebook.proguard.annotations.DoNotStrip;
|
||||
@DoNotStrip
|
||||
public abstract class JavaScriptExecutor extends Countable {
|
||||
public interface Factory {
|
||||
JavaScriptExecutor create() throws Exception;
|
||||
JavaScriptExecutor create(WritableNativeMap jscConfig) throws Exception;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,7 +32,7 @@ public class ProxyJavaScriptExecutor extends JavaScriptExecutor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public JavaScriptExecutor create() throws Exception {
|
||||
public JavaScriptExecutor create(WritableNativeMap jscConfig) throws Exception {
|
||||
return new ProxyJavaScriptExecutor(mJavaJSExecutorFactory.create());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user