Permalink
Browse files

Rename Executor to JSExecutor

Summary:
* Cleanup some header files so we use more forward declarations
* Rename Executor to JSExecutor.h
* Move some typedefs to more appropriate locations

Reviewed By: mhorowitz

Differential Revision: D5301913

fbshipit-source-id: e75154797eb3f531d2f42a5e95409f4062b85f91
  • Loading branch information...
javache authored and facebook-github-bot committed Jun 23, 2017
1 parent 6aea140 commit e2628f93b55841f0ae509ca2066e0356c92fe896
Showing with 124 additions and 129 deletions.
  1. +1 −1 React/CxxBridge/RCTObjcExecutor.h
  2. +3 −2 React/CxxBridge/RCTObjcExecutor.mm
  3. +10 −10 React/React.xcodeproj/project.pbxproj
  4. +7 −9 ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.cpp
  5. +5 −3 ReactAndroid/src/main/jni/react/jni/JSLoader.cpp
  6. +1 −1 ReactAndroid/src/main/jni/react/jni/JSLoader.h
  7. +1 −2 ReactAndroid/src/main/jni/react/jni/JavaScriptExecutorHolder.h
  8. +1 −1 ReactAndroid/src/main/jni/react/jni/MethodInvoker.h
  9. +2 −2 ReactAndroid/src/main/jni/react/jni/OnLoad.cpp
  10. +1 −2 ReactAndroid/src/main/jni/react/jni/OnLoad.h
  11. +5 −5 ReactAndroid/src/main/jni/react/jni/ProxyExecutor.cpp
  12. +1 −1 ReactAndroid/src/main/jni/react/jni/ProxyExecutor.h
  13. +19 −19 ReactCommon/cxxreact/BUCK
  14. +11 −10 ReactCommon/cxxreact/CxxModule.h
  15. +1 −0 ReactCommon/cxxreact/CxxNativeModule.cpp
  16. +1 −0 ReactCommon/cxxreact/CxxNativeModule.h
  17. +5 −1 ReactCommon/cxxreact/Instance.cpp
  18. +12 −6 ReactCommon/cxxreact/Instance.h
  19. +5 −4 ReactCommon/cxxreact/JSCExecutor.cpp
  20. +1 −1 ReactCommon/cxxreact/JSCExecutor.h
  21. +2 −1 ReactCommon/cxxreact/JSCUtils.h
  22. +2 −17 ReactCommon/cxxreact/{Executor.h → JSExecutor.h}
  23. +2 −0 ReactCommon/cxxreact/JSIndexedRAMBundle.cpp
  24. +2 −3 ReactCommon/cxxreact/JSIndexedRAMBundle.h
  25. +2 −2 ReactCommon/cxxreact/MethodCall.h
  26. +2 −2 ReactCommon/cxxreact/ModuleRegistry.h
  27. +3 −3 ReactCommon/cxxreact/NativeModule.h
  28. +9 −7 ReactCommon/cxxreact/NativeToJsBridge.cpp
  29. +5 −11 ReactCommon/cxxreact/NativeToJsBridge.h
  30. +1 −1 ReactCommon/cxxreact/Platform.h
  31. +1 −2 ReactCommon/cxxreact/tests/jsbigstring.cpp
@@ -12,7 +12,7 @@
#import <React/RCTDefines.h>
#import <React/RCTJavaScriptExecutor.h>
#include <cxxreact/Executor.h>
#import <cxxreact/JSExecutor.h>
namespace facebook {
namespace react {
@@ -15,7 +15,8 @@
#import <React/RCTLog.h>
#import <React/RCTProfile.h>
#import <React/RCTUtils.h>
#import <cxxreact/Executor.h>
#import <cxxreact/JSBigString.h>
#import <cxxreact/JSExecutor.h>
#import <cxxreact/MessageQueueThread.h>
#import <cxxreact/ModuleRegistry.h>
#import <folly/json.h>
@@ -91,7 +92,7 @@ void loadApplicationScript(
}
void setJSModulesUnbundle(std::unique_ptr<JSModulesUnbundle>) override {
RCTLogWarn(@"Unbundle is not supported in RCTObjcExecutor");
RCTAssert(NO, @"Unbundle is not supported in RCTObjcExecutor");
}
void callFunction(const std::string &module, const std::string &method,
@@ -220,7 +220,7 @@
19F61C071E8495FF00571D81 /* Value.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D92B10D1E0369AD0018521A /* Value.h */; };
27595AA41E575C7800CCE2B1 /* CxxModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0A71E03699D0018521A /* CxxModule.h */; };
27595AA51E575C7800CCE2B1 /* CxxNativeModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0A91E03699D0018521A /* CxxNativeModule.h */; };
27595AA61E575C7800CCE2B1 /* Executor.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0AB1E03699D0018521A /* Executor.h */; };
27595AA61E575C7800CCE2B1 /* JSExecutor.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0AB1E03699D0018521A /* JSExecutor.h */; };
27595AA91E575C7800CCE2B1 /* Instance.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0AF1E03699D0018521A /* Instance.h */; };
27595AAA1E575C7800CCE2B1 /* JsArgumentHelpers-inl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0B01E03699D0018521A /* JsArgumentHelpers-inl.h */; };
27595AAB1E575C7800CCE2B1 /* JsArgumentHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0B11E03699D0018521A /* JsArgumentHelpers.h */; };
@@ -243,7 +243,7 @@
27595ABD1E575C7800CCE2B1 /* SystraceSection.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0D51E03699D0018521A /* SystraceSection.h */; };
27595ABF1E575C7800CCE2B1 /* CxxModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0A71E03699D0018521A /* CxxModule.h */; };
27595AC01E575C7800CCE2B1 /* CxxNativeModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0A91E03699D0018521A /* CxxNativeModule.h */; };
27595AC11E575C7800CCE2B1 /* Executor.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0AB1E03699D0018521A /* Executor.h */; };
27595AC11E575C7800CCE2B1 /* JSExecutor.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0AB1E03699D0018521A /* JSExecutor.h */; };
27595AC41E575C7800CCE2B1 /* Instance.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0AF1E03699D0018521A /* Instance.h */; };
27595AC51E575C7800CCE2B1 /* JsArgumentHelpers-inl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0B01E03699D0018521A /* JsArgumentHelpers-inl.h */; };
27595AC61E575C7800CCE2B1 /* JsArgumentHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0B11E03699D0018521A /* JsArgumentHelpers.h */; };
@@ -794,7 +794,7 @@
3DA9819E1E5B0DBB004F2374 /* NSDataBigString.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D7454B31E54786200E74ADD /* NSDataBigString.h */; };
3DA981A01E5B0E34004F2374 /* CxxModule.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0A71E03699D0018521A /* CxxModule.h */; };
3DA981A11E5B0E34004F2374 /* CxxNativeModule.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0A91E03699D0018521A /* CxxNativeModule.h */; };
3DA981A21E5B0E34004F2374 /* Executor.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0AB1E03699D0018521A /* Executor.h */; };
3DA981A21E5B0E34004F2374 /* JSExecutor.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0AB1E03699D0018521A /* JSExecutor.h */; };
3DA981A51E5B0E34004F2374 /* Instance.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0AF1E03699D0018521A /* Instance.h */; };
3DA981A61E5B0E34004F2374 /* JsArgumentHelpers-inl.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0B01E03699D0018521A /* JsArgumentHelpers-inl.h */; };
3DA981A71E5B0E34004F2374 /* JsArgumentHelpers.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0B11E03699D0018521A /* JsArgumentHelpers.h */; };
@@ -933,7 +933,7 @@
3DA982391E5B0F8A004F2374 /* UIView+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 83F15A171B7CC46900F10295 /* UIView+Private.h */; };
3DA9823B1E5B1053004F2374 /* CxxModule.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0A71E03699D0018521A /* CxxModule.h */; };
3DA9823C1E5B1053004F2374 /* CxxNativeModule.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0A91E03699D0018521A /* CxxNativeModule.h */; };
3DA9823D1E5B1053004F2374 /* Executor.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0AB1E03699D0018521A /* Executor.h */; };
3DA9823D1E5B1053004F2374 /* JSExecutor.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0AB1E03699D0018521A /* JSExecutor.h */; };
3DA982401E5B1053004F2374 /* Instance.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0AF1E03699D0018521A /* Instance.h */; };
3DA982411E5B1053004F2374 /* JsArgumentHelpers-inl.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0B01E03699D0018521A /* JsArgumentHelpers-inl.h */; };
3DA982421E5B1053004F2374 /* JsArgumentHelpers.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 3D92B0B11E03699D0018521A /* JsArgumentHelpers.h */; };
@@ -1317,7 +1317,7 @@
files = (
3DA9823B1E5B1053004F2374 /* CxxModule.h in Copy Headers */,
3DA9823C1E5B1053004F2374 /* CxxNativeModule.h in Copy Headers */,
3DA9823D1E5B1053004F2374 /* Executor.h in Copy Headers */,
3DA9823D1E5B1053004F2374 /* JSExecutor.h in Copy Headers */,
3DA982401E5B1053004F2374 /* Instance.h in Copy Headers */,
3DA982411E5B1053004F2374 /* JsArgumentHelpers-inl.h in Copy Headers */,
3DA982421E5B1053004F2374 /* JsArgumentHelpers.h in Copy Headers */,
@@ -1533,7 +1533,7 @@
files = (
3DA981A01E5B0E34004F2374 /* CxxModule.h in Copy Headers */,
3DA981A11E5B0E34004F2374 /* CxxNativeModule.h in Copy Headers */,
3DA981A21E5B0E34004F2374 /* Executor.h in Copy Headers */,
3DA981A21E5B0E34004F2374 /* JSExecutor.h in Copy Headers */,
3DA981A51E5B0E34004F2374 /* Instance.h in Copy Headers */,
3DA981A61E5B0E34004F2374 /* JsArgumentHelpers-inl.h in Copy Headers */,
3DA981A71E5B0E34004F2374 /* JsArgumentHelpers.h in Copy Headers */,
@@ -1862,7 +1862,7 @@
3D92B0A71E03699D0018521A /* CxxModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CxxModule.h; sourceTree = "<group>"; };
3D92B0A81E03699D0018521A /* CxxNativeModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CxxNativeModule.cpp; sourceTree = "<group>"; };
3D92B0A91E03699D0018521A /* CxxNativeModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CxxNativeModule.h; sourceTree = "<group>"; };
3D92B0AB1E03699D0018521A /* Executor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Executor.h; sourceTree = "<group>"; };
3D92B0AB1E03699D0018521A /* JSExecutor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSExecutor.h; sourceTree = "<group>"; };
3D92B0AE1E03699D0018521A /* Instance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Instance.cpp; sourceTree = "<group>"; };
3D92B0AF1E03699D0018521A /* Instance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Instance.h; sourceTree = "<group>"; };
3D92B0B01E03699D0018521A /* JsArgumentHelpers-inl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "JsArgumentHelpers-inl.h"; sourceTree = "<group>"; };
@@ -2593,7 +2593,7 @@
3D92B0A71E03699D0018521A /* CxxModule.h */,
3D92B0A81E03699D0018521A /* CxxNativeModule.cpp */,
3D92B0A91E03699D0018521A /* CxxNativeModule.h */,
3D92B0AB1E03699D0018521A /* Executor.h */,
3D92B0AB1E03699D0018521A /* JSExecutor.h */,
3D92B0AE1E03699D0018521A /* Instance.cpp */,
3D92B0AF1E03699D0018521A /* Instance.h */,
3D92B0B01E03699D0018521A /* JsArgumentHelpers-inl.h */,
@@ -2852,7 +2852,7 @@
27595AD01E575C7800CCE2B1 /* JSIndexedRAMBundle.h in Headers */,
27595AD31E575C7800CCE2B1 /* ModuleRegistry.h in Headers */,
27595ACC1E575C7800CCE2B1 /* JSCPerfStats.h in Headers */,
27595AC11E575C7800CCE2B1 /* Executor.h in Headers */,
27595AC11E575C7800CCE2B1 /* JSExecutor.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2941,7 +2941,7 @@
27595AB51E575C7800CCE2B1 /* JSIndexedRAMBundle.h in Headers */,
27595AB81E575C7800CCE2B1 /* ModuleRegistry.h in Headers */,
27595AB11E575C7800CCE2B1 /* JSCPerfStats.h in Headers */,
27595AA61E575C7800CCE2B1 /* Executor.h in Headers */,
27595AA61E575C7800CCE2B1 /* JSExecutor.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -5,21 +5,19 @@
#include <mutex>
#include <condition_variable>
#include <folly/dynamic.h>
#include <folly/Memory.h>
#include <fb/log.h>
#include <jni/Countable.h>
#include <jni/LocalReference.h>
#include <cxxreact/CxxNativeModule.h>
#include <cxxreact/Instance.h>
#include <cxxreact/JSBigString.h>
#include <cxxreact/JSBundleType.h>
#include <cxxreact/JSIndexedRAMBundle.h>
#include <cxxreact/MethodCall.h>
#include <cxxreact/RecoverableError.h>
#include <cxxreact/ModuleRegistry.h>
#include <cxxreact/CxxNativeModule.h>
#include <fb/log.h>
#include <folly/dynamic.h>
#include <folly/Memory.h>
#include <jni/Countable.h>
#include <jni/LocalReference.h>
#include "CxxModuleWrapper.h"
#include "JavaScriptExecutorHolder.h"
@@ -2,15 +2,17 @@
#include "JSLoader.h"
#include <folly/Conv.h>
#include <folly/Memory.h>
#include <android/asset_manager_jni.h>
#include <cxxreact/JSBigString.h>
#include <fb/fbjni.h>
#include <fb/log.h>
#include <folly/Conv.h>
#include <folly/Memory.h>
#include <fstream>
#include <sstream>
#include <streambuf>
#include <string>
#include <fb/log.h>
#ifdef WITH_FBSYSTRACE
#include <fbsystrace.h>
using fbsystrace::FbSystraceSection;
@@ -5,7 +5,7 @@
#include <string>
#include <android/asset_manager.h>
#include <cxxreact/Executor.h>
#include <cxxreact/JSExecutor.h>
#include <fb/fbjni.h>
namespace facebook {
@@ -2,10 +2,9 @@
#include <memory>
#include <cxxreact/JSExecutor.h>
#include <fb/fbjni.h>
#include <cxxreact/Executor.h>
namespace facebook {
namespace react {
@@ -4,9 +4,9 @@
#include <vector>
#include <cxxreact/JSExecutor.h>
#include <fb/fbjni.h>
#include <folly/dynamic.h>
#include <cxxreact/Executor.h>
namespace facebook {
namespace react {
@@ -2,10 +2,10 @@
#include <string>
#include <cxxreact/Executor.h>
#include <jschelpers/JSCHelpers.h>
#include <cxxreact/JSExecutor.h>
#include <cxxreact/JSCExecutor.h>
#include <cxxreact/Platform.h>
#include <jschelpers/JSCHelpers.h>
#include <fb/fbjni.h>
#include <fb/glog_init.h>
#include <fb/log.h>
@@ -3,12 +3,11 @@
#pragma once
#include <jni.h>
#include <jni/Countable.h>
#include <cxxreact/Executor.h>
namespace facebook {
namespace react {
jmethodID getLogMarkerMethod();
} // namespace react
} // namespace facebook
@@ -2,15 +2,15 @@
#include "ProxyExecutor.h"
#include <cxxreact/JSBigString.h>
#include <cxxreact/ModuleRegistry.h>
#include <cxxreact/SystraceSection.h>
#include <fb/assert.h>
#include <fb/Environment.h>
#include <jni/LocalReference.h>
#include <jni/LocalString.h>
#include <folly/json.h>
#include <folly/Memory.h>
#include <cxxreact/SystraceSection.h>
#include <cxxreact/ModuleRegistry.h>
#include <jni/LocalReference.h>
#include <jni/LocalString.h>
namespace facebook {
namespace react {
@@ -2,7 +2,7 @@
#pragma once
#include <cxxreact/Executor.h>
#include <cxxreact/JSExecutor.h>
#include <fb/fbjni.h>
#include <jni.h>
#include <jni/GlobalReference.h>
View
@@ -11,7 +11,7 @@ if THIS_IS_FBOBJC:
rn_xplat_cxx_library(
name = "module",
compiler_flags = CXX_LIBRARY_COMPILER_FLAGS,
header_namespace = "",
exported_headers = subdir_glob(
[
("", "CxxModule.h"),
@@ -20,8 +20,8 @@ rn_xplat_cxx_library(
],
prefix = "cxxreact",
),
compiler_flags = CXX_LIBRARY_COMPILER_FLAGS,
force_static = True,
header_namespace = "",
visibility = [
"PUBLIC",
],
@@ -36,16 +36,16 @@ rn_xplat_cxx_library(
srcs = [
"JSBigString.cpp",
],
compiler_flags = CXX_LIBRARY_COMPILER_FLAGS + [
"-fexceptions",
"-frtti",
],
header_namespace = "",
exported_headers = subdir_glob(
[("", "JSBigString.h")],
prefix = "cxxreact",
),
compiler_flags = CXX_LIBRARY_COMPILER_FLAGS + [
"-fexceptions",
"-frtti",
],
force_static = True,
header_namespace = "",
visibility = [
"PUBLIC",
],
@@ -58,12 +58,12 @@ rn_xplat_cxx_library(
rn_xplat_cxx_library(
name = "samplemodule",
srcs = ["SampleCxxModule.cpp"],
header_namespace = "",
exported_headers = ["SampleCxxModule.h"],
compiler_flags = CXX_LIBRARY_COMPILER_FLAGS + [
"-fno-omit-frame-pointer",
"-fexceptions",
],
exported_headers = ["SampleCxxModule.h"],
header_namespace = "",
soname = "libxplat_react_module_samplemodule.so",
visibility = [
"PUBLIC",
@@ -77,9 +77,9 @@ rn_xplat_cxx_library(
CXXREACT_PUBLIC_HEADERS = [
"CxxNativeModule.h",
"Executor.h",
"Instance.h",
"JSBundleType.h",
"JSExecutor.h",
"JSCExecutor.h",
"JSCNativeModules.h",
"JSIndexedRAMBundle.h",
@@ -104,17 +104,22 @@ rn_xplat_cxx_library(
"SampleCxxModule.cpp",
],
),
compiler_flags = CXX_LIBRARY_COMPILER_FLAGS + [
"-fexceptions",
"-frtti",
],
headers = glob(
["*.h"],
excludes = CXXREACT_PUBLIC_HEADERS,
),
header_namespace = "",
exported_headers = dict([
(
"cxxreact/%s" % header,
header,
)
for header in CXXREACT_PUBLIC_HEADERS
]),
compiler_flags = CXX_LIBRARY_COMPILER_FLAGS + [
"-fexceptions",
"-frtti",
],
fbandroid_preprocessor_flags = [
"-DWITH_JSC_EXTRA_TRACING=1",
"-DWITH_JSC_MEMORY_PRESSURE=1",
@@ -144,11 +149,6 @@ rn_xplat_cxx_library(
fbobjc_preprocessor_flags = DEBUG_PREPROCESSOR_FLAGS,
fbobjc_visibility = ["PUBLIC"],
force_static = True,
header_namespace = "",
headers = glob(
["*.h"],
excludes = CXXREACT_PUBLIC_HEADERS,
),
preprocessor_flags = [
"-DLOG_TAG=\"ReactNative\"",
"-DWITH_FBSYSTRACE=1",
Oops, something went wrong.

0 comments on commit e2628f9

Please sign in to comment.