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:
Alex Kotliarskyi
2016-06-07 11:07:53 -07:00
committed by Facebook Github Bot 2
parent a7404713a4
commit f3fab5184e
5 changed files with 2 additions and 32 deletions

View File

@@ -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));

View File

@@ -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>();