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
Original file line number Diff line number Diff line change
Expand Up @@ -776,22 +776,6 @@ public void runApplication() {
}
}

/**
* Is used by unit test to setup mIsAttachedToWindow flags, that will let this view to be properly
* attached to catalyst instance by startReactApplication call
*/
@VisibleForTesting
/* package */ void simulateAttachForTesting() {
mIsAttachedToInstance = true;
mJSTouchDispatcher = new JSTouchDispatcher(this);
if (ReactFeatureFlags.dispatchPointerEvents) {
mJSPointerDispatcher = new JSPointerDispatcher(this);
}
if (ReactNativeFeatureFlags.enableKeyEvents()) {
mJSKeyDispatcher = new JSKeyDispatcher();
}
}

@VisibleForTesting
/* package */ void simulateCheckForKeyboardForTesting() {
getCustomGlobalLayoutListener().checkForKeyboardEvents();
Expand Down

This file was deleted.

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.

12 changes: 0 additions & 12 deletions packages/react-native/ReactCommon/cxxreact/RAMBundleRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,6 @@ namespace facebook::react {
constexpr uint32_t RAMBundleRegistry::MAIN_BUNDLE_ID;
#pragma clang diagnostic pop

std::unique_ptr<RAMBundleRegistry> RAMBundleRegistry::singleBundleRegistry(
std::unique_ptr<JSModulesUnbundle> mainBundle) {
return std::make_unique<RAMBundleRegistry>(std::move(mainBundle));
}

std::unique_ptr<RAMBundleRegistry> RAMBundleRegistry::multipleBundlesRegistry(
std::unique_ptr<JSModulesUnbundle> mainBundle,
std::function<std::unique_ptr<JSModulesUnbundle>(std::string)> factory) {
return std::make_unique<RAMBundleRegistry>(
std::move(mainBundle), std::move(factory));
}

RAMBundleRegistry::RAMBundleRegistry(
std::unique_ptr<JSModulesUnbundle> mainBundle,
std::function<std::unique_ptr<JSModulesUnbundle>(std::string)> factory)
Expand Down
Loading
Loading