Skip to content

Commit

Permalink
Remove JSC references
Browse files Browse the repository at this point in the history
Summary:
Removing entire files will be the next diff
@public

Reviewed By: fkgozali

Differential Revision: D9328239

fbshipit-source-id: 083847d3b841a3c7bfa751a82e8cc16bd112bace
  • Loading branch information
mhorowitz authored and facebook-github-bot committed Oct 18, 2018
1 parent 53fa813 commit 6796e62
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 47 deletions.
2 changes: 1 addition & 1 deletion ReactAndroid/src/main/jni/react/jni/BUCK
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
load("//tools/build_defs/oss:rn_defs.bzl", "ANDROID", "FBJNI_TARGET", "IS_OSS_BUILD", "react_native_xplat_dep", "react_native_xplat_target", "rn_xplat_cxx_library")

EXPORTED_HEADERS = [
"AndroidJSCFactory.h",
"CxxModuleWrapper.h",
"CxxModuleWrapperBase.h",
"CxxSharedModuleWrapper.h",
Expand Down Expand Up @@ -52,6 +51,7 @@ rn_xplat_cxx_library(
],
deps = ([
"xplat//third-party/linker_lib:android",
"xplat//third-party/linker_lib:atomic",
"xplat//folly:molly",
"fbandroid//xplat/fbgloginit:fbgloginit",
"xplat//fbsystrace:fbsystrace",
Expand Down
23 changes: 0 additions & 23 deletions ReactAndroid/src/main/jni/react/jni/OnLoad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <fb/glog_init.h>
#include <fb/log.h>

#include "AndroidJSCFactory.h"
#include "CatalystInstanceImpl.h"
#include "CxxModuleWrapper.h"
#include "JavaScriptExecutorHolder.h"
Expand All @@ -30,27 +29,6 @@ namespace react {

namespace {

// TODO: can we avoid these wrapper classes, and instead specialize the logic in CatalystInstanceImpl
class JSCJavaScriptExecutorHolder : public HybridClass<JSCJavaScriptExecutorHolder,
JavaScriptExecutorHolder> {
public:
static constexpr auto kJavaDescriptor = "Lcom/facebook/react/bridge/JSCJavaScriptExecutor;";

static local_ref<jhybriddata> initHybrid(alias_ref<jclass>, ReadableNativeMap* jscConfig) {
return makeCxxInstance(makeAndroidJSCExecutorFactory(jscConfig->consume()));
}

static void registerNatives() {
registerHybrid({
makeNativeMethod("initHybrid", JSCJavaScriptExecutorHolder::initHybrid),
});
}

private:
friend HybridBase;
using HybridBase::HybridBase;
};

struct JavaJSExecutor : public JavaClass<JavaJSExecutor> {
static constexpr auto kJavaDescriptor = "Lcom/facebook/react/bridge/JavaJSExecutor;";
};
Expand Down Expand Up @@ -83,7 +61,6 @@ class ProxyJavaScriptExecutorHolder : public HybridClass<ProxyJavaScriptExecutor
extern "C" JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
return initialize(vm, [] {
gloginit::initialize();
JSCJavaScriptExecutorHolder::registerNatives();
ProxyJavaScriptExecutorHolder::registerNatives();
CatalystInstanceImpl::registerNatives();
CxxModuleWrapperBase::registerNatives();
Expand Down
14 changes: 2 additions & 12 deletions ReactCommon/cxxreact/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,15 @@ CXXREACT_PUBLIC_HEADERS = [
"CxxNativeModule.h",
"Instance.h",
"JSBundleType.h",
"JSExecutor.h",
"JSCExecutor.h",
"JSCNativeModules.h",
"JSCUtils.h",
"JSDeltaBundleClient.h",
"JSExecutor.h",
"JSIndexedRAMBundle.h",
"JSModulesUnbundle.h",
"MessageQueueThread.h",
"MethodCall.h",
"ModuleRegistry.h",
"NativeModule.h",
"NativeToJsBridge.h",
"Platform.h",
"RAMBundleRegistry.h",
"ReactMarker.h",
"RecoverableError.h",
Expand Down Expand Up @@ -126,11 +122,7 @@ rn_xplat_cxx_library(
"-frtti",
],
fbandroid_deps = ANDROID_JSC_DEPS,
fbandroid_preprocessor_flags = get_android_inspector_flags() + [
"-DWITH_JSC_EXTRA_TRACING=1",
"-DWITH_JSC_MEMORY_PRESSURE=1",
"-DWITH_FB_MEMORY_PROFILING=1",
],
fbandroid_preprocessor_flags = get_android_inspector_flags(),
fbobjc_compiler_flags = get_apple_compiler_flags(),
fbobjc_deps = APPLE_JSC_DEPS,
fbobjc_force_static = True,
Expand All @@ -156,12 +148,10 @@ rn_xplat_cxx_library(
"xplat//folly:molly",
":jsbigstring",
":module",
react_native_xplat_target("jschelpers:jschelpers"),
react_native_xplat_target("jsinspector:jsinspector"),
react_native_xplat_target("microprofiler:microprofiler"),
"xplat//folly:optional",
"xplat//third-party/glog:glog",
react_native_xplat_target("jschelpers:jscinternalhelpers"),
react_native_xplat_target("privatedata:privatedata"),
],
)
13 changes: 4 additions & 9 deletions ReactCommon/cxxreact/tests/BUCK
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
load(
"//tools/build_defs/oss:rn_defs.bzl",
"ANDROID_JSC_DEPS",
"APPLE",
"APPLE_JSC_DEPS",
"fb_xplat_cxx_test",
"jni_instrumentation_test_lib",
"react_native_xplat_target",
Expand All @@ -12,10 +10,7 @@ TEST_SRCS = [
"RecoverableErrorTest.cpp",
"jsarg_helpers.cpp",
"jsbigstring.cpp",
"jscexecutor.cpp",
"jsclogging.cpp",
"methodcall.cpp",
"value.cpp",
]

jni_instrumentation_test_lib(
Expand All @@ -32,10 +27,11 @@ jni_instrumentation_test_lib(
"fbandroid//instrumentation_tests/...",
],
deps = [
"xplat//third-party/linker_lib:android",
"xplat//third-party/gmock:gtest",
"xplat//third-party/linker_lib:android",
"xplat//third-party/linker_lib:atomic",
react_native_xplat_target("cxxreact:bridge"),
] + ANDROID_JSC_DEPS,
],
)

fb_xplat_cxx_test(
Expand All @@ -53,6 +49,5 @@ fb_xplat_cxx_test(
"xplat//folly:molly",
"xplat//third-party/gmock:gtest",
react_native_xplat_target("cxxreact:bridge"),
react_native_xplat_target("jschelpers:jschelpers"),
] + APPLE_JSC_DEPS,
],
)
2 changes: 0 additions & 2 deletions tools/build_defs/oss/rn_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ GLOG_DEP = "//ReactAndroid/build/third-party-ndk/glog:glog"

INSPECTOR_FLAGS = []

APPLE_JSC_INTERNAL_DEPS = []

APPLE_JSC_DEPS = []

ANDROID_JSC_INTERNAL_DEPS = [
Expand Down

0 comments on commit 6796e62

Please sign in to comment.