@@ -73,7 +73,7 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
7373}
7474
7575@interface RCTBundleProvider : NSObject
76- - (void )setBundle : (std::shared_ptr<const BigStringBuffer >)bundleBuffer ;
76+ - (void )setBundle : (std::shared_ptr<const JSBigString >)bundleBuffer ;
7777- (void )setSourceURL : (NSString *)sourceURL ;
7878@end
7979
@@ -146,6 +146,7 @@ - (instancetype)initWithDelegate:(id<RCTInstanceDelegate>)delegate
146146 return [self initWithDelegate: delegate
147147 jsRuntimeFactory: jsRuntimeFactory
148148 bundleManager: bundleManager
149+ bundleProvider: bundleProvider
149150 turboModuleManagerDelegate: tmmDelegate
150151 moduleRegistry: moduleRegistry
151152 parentInspectorTarget: parentInspectorTarget
@@ -156,6 +157,7 @@ - (instancetype)initWithDelegate:(id<RCTInstanceDelegate>)delegate
156157- (instancetype )initWithDelegate : (id <RCTInstanceDelegate>)delegate
157158 jsRuntimeFactory : (std::shared_ptr<facebook::react::JSRuntimeFactory>)jsRuntimeFactory
158159 bundleManager : (RCTBundleManager *)bundleManager
160+ bundleProvider : (RCTBundleProvider *)bundleProvider
159161 turboModuleManagerDelegate : (id <RCTTurboModuleManagerDelegate>)tmmDelegate
160162 moduleRegistry : (RCTModuleRegistry *)moduleRegistry
161163 parentInspectorTarget : (jsinspector_modern::HostTarget *)parentInspectorTarget
@@ -610,11 +612,10 @@ - (void)_loadScriptFromSource:(RCTSource *)source
610612 return ;
611613 }
612614
613- auto script = std::make_unique<NSDataBigString>(source.data );
614- const auto scriptBuffer = std::make_shared<const BigStringBuffer>(std::move (script));
615+ auto script = std::make_shared<NSDataBigString>(source.data );
615616 const auto *url = deriveSourceURL (source.url ).UTF8String ;
616617
617- [_bundleProvider setBundle: scriptBuffer ];
618+ [_bundleProvider setBundle: script ];
618619 [_bundleProvider setSourceURL: @(url)];
619620
620621 auto beforeLoad = [waitUntilModuleSetupComplete = self ->_waitUntilModuleSetupComplete](jsi::Runtime &_) {
@@ -625,7 +626,7 @@ - (void)_loadScriptFromSource:(RCTSource *)source
625626 auto afterLoad = [](jsi::Runtime &_) {
626627 [[NSNotificationCenter defaultCenter ] postNotificationName: @" RCTInstanceDidLoadBundle" object: nil ];
627628 };
628- _reactInstance->loadScript (scriptBuffer , url, beforeLoad, afterLoad);
629+ _reactInstance->loadScript (script , url, beforeLoad, afterLoad);
629630}
630631
631632- (void )_handleJSError : (const JsErrorHandler::ProcessedError &)error withRuntime : (jsi::Runtime &)runtime
0 commit comments