Skip to content

Commit 70c3590

Browse files
bnhamfacebook-github-bot
authored andcommitted
move inspector out of jschelpers
Differential Revision: D6385924 fbshipit-source-id: 1913d903077494cc0d86d5a8c8839620f1ecab0c
1 parent 850efa8 commit 70c3590

File tree

13 files changed

+294
-23
lines changed

13 files changed

+294
-23
lines changed

React.podspec

+16-2
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,21 @@ Pod::Spec.new do |s|
9494
end
9595

9696
s.subspec "jschelpers_legacy" do |ss|
97-
ss.source_files = "ReactCommon/jschelpers/{JavaScriptCore,JSCWrapper,InspectorInterfaces}.{cpp,h}", "ReactCommon/jschelpers/systemJSCWrapper.cpp"
98-
ss.private_header_files = "ReactCommon/jschelpers/{JavaScriptCore,JSCWrapper,InspectorInterfaces}.h"
97+
ss.source_files = "ReactCommon/jschelpers/{JavaScriptCore,JSCWrapper}.{cpp,h}", "ReactCommon/jschelpers/systemJSCWrapper.cpp"
98+
ss.private_header_files = "ReactCommon/jschelpers/{JavaScriptCore,JSCWrapper}.h"
9999
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
100100
ss.framework = "JavaScriptCore"
101101
end
102102

103+
s.subspec "jsinspector_legacy" do |ss|
104+
ss.source_files = "ReactCommon/jsinspector/{InspectorInterfaces}.{cpp,h}"
105+
ss.private_header_files = "ReactCommon/jsinspector/{InspectorInterfaces}.h"
106+
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
107+
end
108+
103109
s.subspec "cxxreact_legacy" do |ss|
104110
ss.dependency "React/jschelpers_legacy"
111+
ss.dependency "React/jsinspector_legacy"
105112
ss.source_files = "ReactCommon/cxxreact/{JSBundleType,oss-compat-util}.{cpp,h}"
106113
ss.private_header_files = "ReactCommon/cxxreact/{JSBundleType,oss-compat-util}.h"
107114
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
@@ -117,6 +124,12 @@ Pod::Spec.new do |s|
117124
ss.framework = "JavaScriptCore"
118125
end
119126

127+
s.subspec "jsinspector" do |ss|
128+
ss.source_files = "ReactCommon/jsinspector/*.{cpp,h}"
129+
ss.private_header_files = "ReactCommon/jsinspector/*.h"
130+
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
131+
end
132+
120133
s.subspec "PrivateDatabase" do |ss|
121134
ss.source_files = "ReactCommon/privatedata/*.{cpp,h}"
122135
ss.private_header_files = "ReactCommon/privatedata/*.h"
@@ -125,6 +138,7 @@ Pod::Spec.new do |s|
125138

126139
s.subspec "cxxreact" do |ss|
127140
ss.dependency "React/jschelpers"
141+
ss.dependency "React/jsinspector"
128142
ss.dependency "boost"
129143
ss.dependency "Folly", "2016.09.26.00"
130144
ss.compiler_flags = folly_compiler_flags

React/Inspector/RCTInspector.mm

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
#if RCT_DEV
55

6-
#include <jschelpers/InspectorInterfaces.h>
76
#include <jschelpers/JavaScriptCore.h>
7+
#include <jsinspector/InspectorInterfaces.h>
88

99
#import "RCTDefines.h"
1010
#import "RCTInspectorPackagerConnection.h"

React/React.xcodeproj/project.pbxproj

+227-16
Large diffs are not rendered by default.

ReactAndroid/src/main/jni/packagerconnection/BUCK

+1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ cxx_library(
2727
FBJNI_TARGET,
2828
"xplat//folly:molly",
2929
react_native_xplat_target("jschelpers:jschelpers"),
30+
react_native_xplat_target("jsinspector:jsinspector"),
3031
] + JSC_DEPS) if not IS_OSS_BUILD else [],
3132
)

ReactAndroid/src/main/jni/react/jni/JInspector.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#ifdef WITH_INSPECTOR
66

7-
#include <jschelpers/InspectorInterfaces.h>
7+
#include <jsinspector/InspectorInterfaces.h>
88

99
#include <fb/fbjni.h>
1010
#include <folly/Memory.h>

ReactCommon/cxxreact/Android.mk

+1
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@ $(call import-module,folly)
4545
$(call import-module,jsc)
4646
$(call import-module,glog)
4747
$(call import-module,jschelpers)
48+
$(call import-module,jsinspector)
4849
$(call import-module,privatedata)

ReactCommon/cxxreact/BUCK

+1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ rn_xplat_cxx_library(
143143
"xplat//fbsystrace:fbsystrace",
144144
"xplat//folly:molly",
145145
react_native_xplat_target("jschelpers:jschelpers"),
146+
react_native_xplat_target("jsinspector:jsinspector"),
146147
react_native_xplat_target("microprofiler:microprofiler"),
147148
] + JSC_DEPS,
148149
)

ReactCommon/cxxreact/JSCExecutor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
#include <folly/Memory.h>
2020
#include <folly/String.h>
2121
#include <glog/logging.h>
22-
#include <jschelpers/InspectorInterfaces.h>
2322
#include <jschelpers/JSCHelpers.h>
2423
#include <jschelpers/Value.h>
24+
#include <jsinspector/InspectorInterfaces.h>
2525

2626
#include "JSBigString.h"
2727
#include "JSBundleType.h"

ReactCommon/jschelpers/BUCK

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
include_defs("//ReactCommon/DEFS")
22

33
EXPORTED_HEADERS = [
4-
"InspectorInterfaces.h",
54
"JavaScriptCore.h",
65
"JSCHelpers.h",
76
"JSCWrapper.h",

ReactCommon/jsinspector/Android.mk

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
LOCAL_PATH := $(call my-dir)
2+
3+
include $(CLEAR_VARS)
4+
5+
LOCAL_MODULE := jsinspector
6+
7+
LOCAL_SRC_FILES := \
8+
InspectorInterfaces.cpp
9+
10+
LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
11+
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
12+
13+
LOCAL_CFLAGS += -Wall -Werror -fexceptions
14+
CXX11_FLAGS := -std=c++11
15+
LOCAL_CFLAGS += $(CXX11_FLAGS)
16+
LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS)
17+
18+
include $(BUILD_SHARED_LIBRARY)

ReactCommon/jsinspector/BUCK

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
include_defs("//ReactCommon/DEFS")
2+
3+
EXPORTED_HEADERS = [
4+
"InspectorInterfaces.h",
5+
]
6+
7+
rn_xplat_cxx_library(
8+
name = "jsinspector",
9+
srcs = glob(
10+
["*.cpp"],
11+
),
12+
headers = glob(
13+
["*.h"],
14+
excludes = EXPORTED_HEADERS,
15+
),
16+
header_namespace = "jsinspector",
17+
exported_headers = EXPORTED_HEADERS,
18+
compiler_flags = [
19+
"-Wall",
20+
"-fexceptions",
21+
"-std=c++1y",
22+
],
23+
visibility = [
24+
"PUBLIC",
25+
],
26+
)

ReactCommon/jschelpers/InspectorInterfaces.h ReactCommon/jsinspector/InspectorInterfaces.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct InspectorPage {
2929

3030
class IRemoteConnection : public IDestructible {
3131
public:
32-
__attribute__((visibility("default"))) virtual ~IRemoteConnection() = 0;
32+
virtual ~IRemoteConnection() = 0;
3333
virtual void onMessage(std::string message) = 0;
3434
virtual void onDisconnect() = 0;
3535
};

0 commit comments

Comments
 (0)