mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-09 22:43:10 +08:00
Remove SourceCode.getScriptText
Summary: After cleaning up JS SourceMap code, these native methods are not needed anymore. On iOS it saves another 30+ Mb during development. Reviewed By: javache, astreet Differential Revision: D3348975 fbshipit-source-id: a68ae9b00b4dbaa374b421029ae676fc69ae5a75
This commit is contained in:
committed by
Facebook Github Bot 2
parent
a7404713a4
commit
f3fab5184e
@@ -81,9 +81,7 @@ import com.facebook.systrace.Systrace;
|
||||
new DeviceEventManagerModule(catalystApplicationContext, mHardwareBackBtnHandler),
|
||||
new ExceptionsManagerModule(mReactInstanceManager.getDevSupportManager()),
|
||||
new Timing(catalystApplicationContext),
|
||||
new SourceCodeModule(
|
||||
mReactInstanceManager.getSourceUrl(),
|
||||
mReactInstanceManager.getDevSupportManager().getSourceMapUrl()),
|
||||
new SourceCodeModule(mReactInstanceManager.getSourceUrl()),
|
||||
uiManagerModule,
|
||||
new JSCHeapCapture(catalystApplicationContext),
|
||||
new DebugComponentOwnershipModule(catalystApplicationContext));
|
||||
|
||||
@@ -25,11 +25,9 @@ import com.facebook.react.bridge.WritableNativeMap;
|
||||
*/
|
||||
public class SourceCodeModule extends BaseJavaModule {
|
||||
|
||||
private final String mSourceMapUrl;
|
||||
private final String mSourceUrl;
|
||||
|
||||
public SourceCodeModule(String sourceUrl, String sourceMapUrl) {
|
||||
mSourceMapUrl = sourceMapUrl;
|
||||
public SourceCodeModule(String sourceUrl) {
|
||||
mSourceUrl = sourceUrl;
|
||||
}
|
||||
|
||||
@@ -38,13 +36,6 @@ public class SourceCodeModule extends BaseJavaModule {
|
||||
return "RCTSourceCode";
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void getScriptText(final Promise promise) {
|
||||
WritableMap map = new WritableNativeMap();
|
||||
map.putString("fullSourceMappingURL", mSourceMapUrl);
|
||||
promise.resolve(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Map<String, Object> getConstants() {
|
||||
HashMap<String, Object> constants = new HashMap<String, Object>();
|
||||
|
||||
Reference in New Issue
Block a user