Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ void CatalystInstanceImpl::jniLoadScriptFromAssets(

std::unique_ptr<Bundle> bundle;
if (FileRAMBundle::isFileRAMBundle(manager, sourceURL.c_str())) {
// TODO: create File RAM Bundle
bundle = std::make_unique<FileRAMBundle>(manager,
sourceURL,
std::move(script));
} else if (IndexedRAMBundle::isIndexedRAMBundle(script.get())) {
bundle = std::make_unique<IndexedRAMBundle>(std::move(script),
sourceURL,
Expand Down
4 changes: 2 additions & 2 deletions ReactAndroid/src/main/jni/react/jni/FileRAMBundle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ bool FileRAMBundle::isFileRAMBundle(AAssetManager* assetManager,
FileRAMBundle::FileRAMBundle(
AAssetManager* assetManager,
const std::string& moduleDirectory,
std::unique_ptr<JSBigString> startupScript)
std::unique_ptr<const JSBigString> startupScript)
: assetManager_(assetManager),
moduleDirectory_(moduleDirectory),
moduleDirectory_(jsModulesDir(moduleDirectory.c_str())),
startupScript_(std::move(startupScript)) {}

std::unique_ptr<const JSBigString> FileRAMBundle::getStartupScript() const {
Expand Down
4 changes: 2 additions & 2 deletions ReactAndroid/src/main/jni/react/jni/FileRAMBundle.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class FileRAMBundle : public RAMBundle {
FileRAMBundle(
AAssetManager* assetManager,
const std::string& moduleDirectory,
std::unique_ptr<JSBigString> startupScript);
std::unique_ptr<const JSBigString> startupScript);
~FileRAMBundle() {}

std::string getSourcePath() const override;
Expand All @@ -31,7 +31,7 @@ class FileRAMBundle : public RAMBundle {
private:
AAssetManager* assetManager_ = nullptr;
std::string moduleDirectory_;
std::unique_ptr<JSBigString> startupScript_;
std::unique_ptr<const JSBigString> startupScript_;
};

} // namespace react
Expand Down