Skip to content

Commit

Permalink
Enable registerSegment in Venice
Browse files Browse the repository at this point in the history
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
  • Loading branch information
luluwu2032 authored and facebook-github-bot committed Jul 27, 2020
1 parent 476ab74 commit a23596f
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -462,4 +462,15 @@ public JavaScriptContextHolder getJavaScriptContextHolder() {
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);
}
}

0 comments on commit a23596f

Please # to comment.