Skip to content
Open
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
43 changes: 0 additions & 43 deletions packages/react-native/ReactCommon/cxxreact/Instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "RecoverableError.h"
#include "TraceSection.h"

#include <cxxreact/JSIndexedRAMBundle.h>
#include <folly/json.h>
#include <react/debug/react_native_assert.h>

Expand Down Expand Up @@ -175,48 +174,6 @@ void Instance::loadScriptFromString(
}
}

void Instance::loadRAMBundleFromString(
std::unique_ptr<const JSBigString> script,
const std::string& sourceURL) {
auto bundle = std::make_unique<JSIndexedRAMBundle>(std::move(script));
auto startupScript = bundle->getStartupCode();
auto registry = RAMBundleRegistry::singleBundleRegistry(std::move(bundle));
loadRAMBundle(std::move(registry), std::move(startupScript), sourceURL, true);
}

void Instance::loadRAMBundleFromFile(
const std::string& sourcePath,
const std::string& sourceURL,
bool loadSynchronously) {
auto bundle = std::make_unique<JSIndexedRAMBundle>(sourcePath.c_str());
auto startupScript = bundle->getStartupCode();
auto registry = RAMBundleRegistry::multipleBundlesRegistry(
std::move(bundle), JSIndexedRAMBundle::buildFactory());
loadRAMBundle(
std::move(registry),
std::move(startupScript),
sourceURL,
loadSynchronously);
}

void Instance::loadRAMBundle(
std::unique_ptr<RAMBundleRegistry> bundleRegistry,
std::unique_ptr<const JSBigString> startupScript,
std::string startupScriptSourceURL,
bool loadSynchronously) {
if (loadSynchronously) {
loadBundleSync(
std::move(bundleRegistry),
std::move(startupScript),
std::move(startupScriptSourceURL));
} else {
loadBundle(
std::move(bundleRegistry),
std::move(startupScript),
std::move(startupScriptSourceURL));
}
}

void Instance::setGlobalVariable(
std::string propName,
std::unique_ptr<const JSBigString> jsonValue) {
Expand Down
10 changes: 0 additions & 10 deletions packages/react-native/ReactCommon/cxxreact/Instance.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,9 @@ class RN_EXPORT [[deprecated("This API will be removed along with the legacy arc
std::shared_ptr<ModuleRegistry> moduleRegistry,
jsinspector_modern::HostTarget *inspectorTarget = nullptr);

void initializeRuntime();

void setSourceURL(std::string sourceURL);

void loadScriptFromString(std::unique_ptr<const JSBigString> string, std::string sourceURL, bool loadSynchronously);
void loadRAMBundleFromString(std::unique_ptr<const JSBigString> script, const std::string &sourceURL);
void loadRAMBundleFromFile(const std::string &sourcePath, const std::string &sourceURL, bool loadSynchronously);
void loadRAMBundle(
std::unique_ptr<RAMBundleRegistry> bundleRegistry,
std::unique_ptr<const JSBigString> startupScript,
std::string startupScriptSourceURL,
bool loadSynchronously);
bool supportsProfiling();
void setGlobalVariable(std::string propName, std::unique_ptr<const JSBigString> jsonValue);
void *getJavaScriptContext();
bool isInspectable();
Expand Down
145 changes: 0 additions & 145 deletions packages/react-native/ReactCommon/cxxreact/JSIndexedRAMBundle.cpp

This file was deleted.

72 changes: 0 additions & 72 deletions packages/react-native/ReactCommon/cxxreact/JSIndexedRAMBundle.h

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions packages/react-native/ReactCommon/react/utils/Telemetry.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,6 @@ DestinationTimePointT clockCast(SourceTimePointT timePoint)
timePoint - sourseClockNow + destinationClockNow);
}

/*
* Returns a number of seconds that passed from the UNIX Epoch starting time
* point to a given time point.
* Also known as POSIX time or UNIX Timestamp.
*/
static inline double telemetryTimePointToSecondsSinceEpoch(TelemetryTimePoint timePoint)
{
auto systemClockTimePoint = clockCast<std::chrono::system_clock::time_point, TelemetryTimePoint>(timePoint);
return (double)std::chrono::duration_cast<std::chrono::microseconds>(systemClockTimePoint.time_since_epoch())
.count() /
1000000.0;
}

/*
* Returns a number of milliseconds that represents the given duration object.
*/
Expand Down
Loading
Loading