Enable registerSegment in Venice

Summary:
Enable registerSegment in Venice and verify bundle splitting works for Pokes with Venice.

Changelog: [Internal]

Reviewed By: ejanzer

Differential Revision: D22666115

fbshipit-source-id: 74ef830b802634b1019d4371873aba599438de37
This commit is contained in:
Lulu Wu
2020-07-27 06:34:37 -07:00
committed by Facebook GitHub Bot
parent 476ab7481e
commit a23596f70f
@@ -462,4 +462,15 @@ public class ReactContext extends ContextWrapper {
public @Nullable String getSourceURL() {
return mCatalystInstance.getSourceURL();
}
/**
* Register a JS segment after loading it from cache or server, make sure mCatalystInstance is
* properly initialised and not null before calling.
*
* @param segmentId
* @param path
*/
public void registerSegment(int segmentId, String path) {
Assertions.assertNotNull(mCatalystInstance).registerSegment(segmentId, path);
}
}