Skip to content

Commit 8096273

Browse files
tadeuzagallofacebook-github-bot-4
authored andcommitted
Rename RCTContextExecutor to RCTJSCExecutor
Summary: public Rename the executor to so it actually says something about the implementation. Reviewed By: jspahrsummers, nicklockwood Differential Revision: D2759688 fb-gh-sync-id: 5b1ac447e75109fbbc2ee71c804710d9926785aa
1 parent f8c125c commit 8096273

File tree

11 files changed

+47
-50
lines changed

11 files changed

+47
-50
lines changed

Examples/UIExplorer/UIExplorer.xcodeproj/project.pbxproj

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
13417FE91AA91432003F314A /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 13417FE81AA91428003F314A /* libRCTImage.a */; };
1717
134180011AA9153C003F314A /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 13417FEF1AA914B8003F314A /* libRCTText.a */; };
1818
1341802C1AA9178B003F314A /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1341802B1AA91779003F314A /* libRCTNetwork.a */; };
19-
134366AF1BFD2C76000A2DE1 /* Thumbnails in Resources */ = {isa = PBXBuildFile; fileRef = 134366AE1BFD2C76000A2DE1 /* Thumbnails */; };
2019
134454601AAFCABD003F0779 /* libRCTAdSupport.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1344545A1AAFCAAE003F0779 /* libRCTAdSupport.a */; };
2120
134A8A2A1AACED7A00945AAE /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 134A8A251AACED6A00945AAE /* libRCTGeolocation.a */; };
2221
138D6A181B53CD440074A87E /* RCTShadowViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 138D6A161B53CD440074A87E /* RCTShadowViewTests.m */; };
@@ -34,7 +33,7 @@
3433
147CED4C1AB3532B00DA3E4C /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 147CED4B1AB34F8C00DA3E4C /* libRCTActionSheet.a */; };
3534
1497CFAC1B21F5E400C1F8F2 /* RCTAllocationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1497CFA41B21F5E400C1F8F2 /* RCTAllocationTests.m */; };
3635
1497CFAD1B21F5E400C1F8F2 /* RCTBridgeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1497CFA51B21F5E400C1F8F2 /* RCTBridgeTests.m */; };
37-
1497CFAE1B21F5E400C1F8F2 /* RCTContextExecutorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1497CFA61B21F5E400C1F8F2 /* RCTContextExecutorTests.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
36+
1497CFAE1B21F5E400C1F8F2 /* RCTJSCExecutorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1497CFA61B21F5E400C1F8F2 /* RCTJSCExecutorTests.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
3837
1497CFAF1B21F5E400C1F8F2 /* RCTConvert_NSURLTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1497CFA71B21F5E400C1F8F2 /* RCTConvert_NSURLTests.m */; };
3938
1497CFB01B21F5E400C1F8F2 /* RCTConvert_UIFontTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1497CFA81B21F5E400C1F8F2 /* RCTConvert_UIFontTests.m */; };
4039
1497CFB11B21F5E400C1F8F2 /* RCTEventDispatcherTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1497CFA91B21F5E400C1F8F2 /* RCTEventDispatcherTests.m */; };
@@ -56,8 +55,8 @@
5655
14D6D7291B2222EF001FB087 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 14AADF041AC3DB95002390C9 /* libReact.a */; };
5756
14DC67F41AB71881001358AB /* libRCTPushNotification.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 14DC67F11AB71876001358AB /* libRCTPushNotification.a */; };
5857
272E6B3F1BEA849E001FCF37 /* UpdatePropertiesExampleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 272E6B3C1BEA849E001FCF37 /* UpdatePropertiesExampleView.m */; };
58+
27B885561BED29AF00008352 /* RCTRootViewIntegrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 27B885551BED29AF00008352 /* RCTRootViewIntegrationTests.m */; };
5959
27F441EC1BEBE5030039B79C /* FlexibleSizeExampleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 27F441E81BEBE5030039B79C /* FlexibleSizeExampleView.m */; };
60-
27B885561BED29AF00008352 /* RCTRootViewIntegrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 27B885551BED29AF00008352 /* RCTRootViewIntegrationTests.m */; settings = {ASSET_TAGS = (); }; };
6160
3578590A1B28D2CF00341EDB /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 357859011B28D2C500341EDB /* libRCTLinking.a */; };
6261
3DB99D0C1BA0340600302749 /* UIExplorerIntegrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DB99D0B1BA0340600302749 /* UIExplorerIntegrationTests.m */; };
6362
834C36EC1AF8DED70019C93C /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 834C36D21AF8DA610019C93C /* libRCTSettings.a */; };
@@ -186,7 +185,6 @@
186185
13417FE31AA91428003F314A /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = ../../Libraries/Image/RCTImage.xcodeproj; sourceTree = "<group>"; };
187186
13417FEA1AA914B8003F314A /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = ../../Libraries/Text/RCTText.xcodeproj; sourceTree = "<group>"; };
188187
134180261AA91779003F314A /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = ../../Libraries/Network/RCTNetwork.xcodeproj; sourceTree = "<group>"; };
189-
134366AE1BFD2C76000A2DE1 /* Thumbnails */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Thumbnails; sourceTree = "<group>"; };
190188
134454551AAFCAAE003F0779 /* RCTAdSupport.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAdSupport.xcodeproj; path = ../../Libraries/AdSupport/RCTAdSupport.xcodeproj; sourceTree = "<group>"; };
191189
134A8A201AACED6A00945AAE /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = ../../Libraries/Geolocation/RCTGeolocation.xcodeproj; sourceTree = "<group>"; };
192190
138D6A161B53CD440074A87E /* RCTShadowViewTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTShadowViewTests.m; sourceTree = "<group>"; };
@@ -216,7 +214,7 @@
216214
144D21231B2204C5006DB32B /* RCTImageUtilTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTImageUtilTests.m; sourceTree = "<group>"; };
217215
1497CFA41B21F5E400C1F8F2 /* RCTAllocationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTAllocationTests.m; sourceTree = "<group>"; };
218216
1497CFA51B21F5E400C1F8F2 /* RCTBridgeTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTBridgeTests.m; sourceTree = "<group>"; };
219-
1497CFA61B21F5E400C1F8F2 /* RCTContextExecutorTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTContextExecutorTests.m; sourceTree = "<group>"; };
217+
1497CFA61B21F5E400C1F8F2 /* RCTJSCExecutorTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTJSCExecutorTests.m; sourceTree = "<group>"; };
220218
1497CFA71B21F5E400C1F8F2 /* RCTConvert_NSURLTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTConvert_NSURLTests.m; sourceTree = "<group>"; };
221219
1497CFA81B21F5E400C1F8F2 /* RCTConvert_UIFontTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTConvert_UIFontTests.m; sourceTree = "<group>"; };
222220
1497CFA91B21F5E400C1F8F2 /* RCTEventDispatcherTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTEventDispatcherTests.m; sourceTree = "<group>"; };
@@ -236,9 +234,9 @@
236234
14E0EEC81AB118F7000DECC3 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = ../../Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj; sourceTree = "<group>"; };
237235
272E6B3B1BEA849E001FCF37 /* UpdatePropertiesExampleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UpdatePropertiesExampleView.h; path = UIExplorer/NativeExampleViews/UpdatePropertiesExampleView.h; sourceTree = "<group>"; };
238236
272E6B3C1BEA849E001FCF37 /* UpdatePropertiesExampleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UpdatePropertiesExampleView.m; path = UIExplorer/NativeExampleViews/UpdatePropertiesExampleView.m; sourceTree = "<group>"; };
237+
27B885551BED29AF00008352 /* RCTRootViewIntegrationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTRootViewIntegrationTests.m; sourceTree = "<group>"; };
239238
27F441E81BEBE5030039B79C /* FlexibleSizeExampleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FlexibleSizeExampleView.m; path = UIExplorer/NativeExampleViews/FlexibleSizeExampleView.m; sourceTree = "<group>"; };
240239
27F441EA1BEBE5030039B79C /* FlexibleSizeExampleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FlexibleSizeExampleView.h; path = UIExplorer/NativeExampleViews/FlexibleSizeExampleView.h; sourceTree = "<group>"; };
241-
27B885551BED29AF00008352 /* RCTRootViewIntegrationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTRootViewIntegrationTests.m; sourceTree = "<group>"; };
242240
357858F81B28D2C400341EDB /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = ../../Libraries/LinkingIOS/RCTLinking.xcodeproj; sourceTree = "<group>"; };
243241
3DB99D0B1BA0340600302749 /* UIExplorerIntegrationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIExplorerIntegrationTests.m; sourceTree = "<group>"; };
244242
58005BE41ABA80530062E044 /* RCTTest.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTTest.xcodeproj; path = ../../Libraries/RCTTest/RCTTest.xcodeproj; sourceTree = "<group>"; };
@@ -410,7 +408,7 @@
410408
children = (
411409
1497CFA41B21F5E400C1F8F2 /* RCTAllocationTests.m */,
412410
1497CFA51B21F5E400C1F8F2 /* RCTBridgeTests.m */,
413-
1497CFA61B21F5E400C1F8F2 /* RCTContextExecutorTests.m */,
411+
1497CFA61B21F5E400C1F8F2 /* RCTJSCExecutorTests.m */,
414412
1497CFA71B21F5E400C1F8F2 /* RCTConvert_NSURLTests.m */,
415413
1497CFA81B21F5E400C1F8F2 /* RCTConvert_UIFontTests.m */,
416414
1497CFA91B21F5E400C1F8F2 /* RCTEventDispatcherTests.m */,
@@ -880,7 +878,7 @@
880878
1393D0381B68CD1300E1B601 /* RCTModuleMethodTests.m in Sources */,
881879
1300627F1B59179B0043FE5A /* RCTGzipTests.m in Sources */,
882880
1497CFAF1B21F5E400C1F8F2 /* RCTConvert_NSURLTests.m in Sources */,
883-
1497CFAE1B21F5E400C1F8F2 /* RCTContextExecutorTests.m in Sources */,
881+
1497CFAE1B21F5E400C1F8F2 /* RCTJSCExecutorTests.m in Sources */,
884882
1497CFAD1B21F5E400C1F8F2 /* RCTBridgeTests.m in Sources */,
885883
1497CFB11B21F5E400C1F8F2 /* RCTEventDispatcherTests.m in Sources */,
886884
1497CFB31B21F5E400C1F8F2 /* RCTUIManagerTests.m in Sources */,

Examples/UIExplorer/UIExplorerUnitTests/RCTAllocationTests.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#import "RCTBridge.h"
1919
#import "RCTBridge+Private.h"
20-
#import "RCTContextExecutor.h"
20+
#import "RCTJSCExecutor.h"
2121
#import "RCTModuleMethod.h"
2222
#import "RCTRootView.h"
2323

Examples/UIExplorer/UIExplorerUnitTests/RCTContextExecutorTests.m renamed to Examples/UIExplorer/UIExplorerUnitTests/RCTJSCExecutorTests.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,24 @@
1616

1717
#import <XCTest/XCTest.h>
1818

19-
#import "RCTContextExecutor.h"
19+
#import "RCTJSCExecutor.h"
2020
#import "RCTUtils.h"
2121

2222
#define RUN_PERF_TESTS 0
2323

24-
@interface RCTContextExecutorTests : XCTestCase
24+
@interface RCTJSCExecutorTests : XCTestCase
2525

2626
@end
2727

28-
@implementation RCTContextExecutorTests
28+
@implementation RCTJSCExecutorTests
2929
{
30-
RCTContextExecutor *_executor;
30+
RCTJSCExecutor *_executor;
3131
}
3232

3333
- (void)setUp
3434
{
3535
[super setUp];
36-
_executor = [RCTContextExecutor new];
36+
_executor = [RCTJSCExecutor new];
3737
[_executor setUp];
3838
}
3939

@@ -97,7 +97,7 @@ - (void)testDeserializationPerf
9797
- (void)testJavaScriptCallSpeed
9898
{
9999
/**
100-
* Since we almost don't change the RCTContextExecutor logic, and this test is
100+
* Since we almost don't change the RCTJSCExecutor logic, and this test is
101101
* very likely to become flaky (specially across different devices) leave it
102102
* to be run manually
103103
*

Libraries/RCTTest/RCTTestRunner.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#import "RCTRootView.h"
1616
#import "RCTTestModule.h"
1717
#import "RCTUtils.h"
18-
#import "RCTContextExecutor.h"
18+
#import "RCTJSCExecutor.h"
1919

2020
static const NSTimeInterval kTestTimeoutSeconds = 60;
2121
static const NSTimeInterval kTestTeardownTimeoutSeconds = 30;
@@ -135,7 +135,7 @@ - (void)runTest:(SEL)test module:(NSString *)moduleName
135135
// Take a weak reference to the JS context, so we track its deallocation later
136136
// (we can only do this now, since it's been lazily initialized)
137137
id jsExecutor = [bridge valueForKeyPath:@"batchedBridge.javaScriptExecutor"];
138-
if ([jsExecutor isKindOfClass:[RCTContextExecutor class]]) {
138+
if ([jsExecutor isKindOfClass:[RCTJSCExecutor class]]) {
139139
weakJSContext = [jsExecutor valueForKey:@"context"];
140140
}
141141
[rootView removeFromSuperview];

React/Base/RCTBatchedBridge.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#import "RCTBridge+Private.h"
1515
#import "RCTBridgeMethod.h"
1616
#import "RCTConvert.h"
17-
#import "RCTContextExecutor.h"
17+
#import "RCTJSCExecutor.h"
1818
#import "RCTFrameUpdate.h"
1919
#import "RCTJavaScriptLoader.h"
2020
#import "RCTLog.h"
@@ -25,7 +25,7 @@
2525
#import "RCTUtils.h"
2626

2727
#define RCTAssertJSThread() \
28-
RCTAssert(![NSStringFromClass([_javaScriptExecutor class]) isEqualToString:@"RCTContextExecutor"] || \
28+
RCTAssert(![NSStringFromClass([_javaScriptExecutor class]) isEqualToString:@"RCTJSCExecutor"] || \
2929
[[[NSThread currentThread] name] isEqualToString:@"com.facebook.React.JavaScript"], \
3030
@"This method must be called on JS thread")
3131

@@ -370,7 +370,7 @@ - (NSString *)moduleConfig
370370
{
371371
NSMutableArray<NSArray *> *config = [NSMutableArray new];
372372
for (RCTModuleData *moduleData in _moduleDataByID) {
373-
if (self.executorClass == [RCTContextExecutor class]) {
373+
if (self.executorClass == [RCTJSCExecutor class]) {
374374
[config addObject:@[moduleData.name]];
375375
} else {
376376
[config addObject:RCTNullIfNil(moduleData.config)];
@@ -432,7 +432,7 @@ - (void)executeSourceCode:(NSData *)sourceCode
432432
}
433433

434434
// Register the display link to start sending js calls after everything is setup
435-
NSRunLoop *targetRunLoop = [_javaScriptExecutor isKindOfClass:[RCTContextExecutor class]] ? [NSRunLoop currentRunLoop] : [NSRunLoop mainRunLoop];
435+
NSRunLoop *targetRunLoop = [_javaScriptExecutor isKindOfClass:[RCTJSCExecutor class]] ? [NSRunLoop currentRunLoop] : [NSRunLoop mainRunLoop];
436436
[_jsDisplayLink addToRunLoop:targetRunLoop forMode:NSRunLoopCommonModes];
437437

438438
// Perform the state update and notification on the main thread, so we can't run into
@@ -490,7 +490,7 @@ - (void)reload
490490

491491
- (Class)executorClass
492492
{
493-
return _parentBridge.executorClass ?: [RCTContextExecutor class];
493+
return _parentBridge.executorClass ?: [RCTJSCExecutor class];
494494
}
495495

496496
- (void)setExecutorClass:(Class)executorClass

React/Base/RCTBridge+Private.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@
6565
- (void)handleBuffer:(NSArray<NSArray *> *)buffer;
6666

6767
/**
68-
* Exposed for the RCTContextExecutor for sending native methods called from
68+
* Exposed for the RCTJSCExecutor for sending native methods called from
6969
* JavaScript in the middle of a batch.
7070
*/
7171
- (void)handleBuffer:(NSArray<NSArray *> *)buffer batchEnded:(BOOL)hasEnded;
7272

7373
/**
74-
* Exposed for the RCTContextExecutor for lazily loading native modules
74+
* Exposed for the RCTJSCExecutor for lazily loading native modules
7575
*/
7676
- (NSArray *)configForModuleName:(NSString *)moduleName;
7777

React/Base/RCTRootView.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ extern NSString *const RCTContentDidAppearNotification;
8585

8686
/**
8787
* The class of the RCTJavaScriptExecutor to use with this view.
88-
* If not specified, it will default to using RCTContextExecutor.
88+
* If not specified, it will default to using RCTJSCExecutor.
8989
* Changes will take effect next time the bundle is reloaded.
9090
*/
9191
@property (nonatomic, strong) Class executorClass;
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@
1111

1212
#import "RCTJavaScriptExecutor.h"
1313

14-
// TODO (#5906496): Might RCTJSCoreExecutor be a better name for this?
15-
1614
/**
1715
* Uses a JavaScriptCore context as the execution engine.
1816
*/
19-
@interface RCTContextExecutor : NSObject <RCTJavaScriptExecutor>
17+
@interface RCTJSCExecutor : NSObject <RCTJavaScriptExecutor>
2018

2119
/**
2220
* Configures the executor to run JavaScript on a specific thread with a given JS context.
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
#import "RCTContextExecutor.h"
10+
#import "RCTJSCExecutor.h"
1111

1212
#import <pthread.h>
1313

@@ -46,7 +46,7 @@ - (instancetype)initWithJSContext:(JSContext *)context
4646
_context = context;
4747

4848
/**
49-
* Explicitly introduce a retain cycle here - The RCTContextExecutor might
49+
* Explicitly introduce a retain cycle here - The RCTJSCExecutor might
5050
* be deallocated while there's still work enqueued in the JS thread, so
5151
* we wouldn't be able kill the JSContext. Instead we create this retain
5252
* cycle, and enqueue the -invalidate message in this object, it then
@@ -84,7 +84,7 @@ - (void)dealloc
8484

8585
@end
8686

87-
@implementation RCTContextExecutor
87+
@implementation RCTJSCExecutor
8888
{
8989
RCTJavaScriptContext *_context;
9090
NSThread *_javaScriptThread;
@@ -186,14 +186,14 @@ - (instancetype)initWithJavaScriptThread:(NSThread *)javaScriptThread
186186
context:(JSContext *)context
187187
{
188188
RCTAssert(javaScriptThread != nil,
189-
@"Can't initialize RCTContextExecutor without a javaScriptThread");
189+
@"Can't initialize RCTJSCExecutor without a javaScriptThread");
190190

191191
if ((self = [super init])) {
192192
_valid = YES;
193193
_javaScriptThread = javaScriptThread;
194-
__weak RCTContextExecutor *weakSelf = self;
194+
__weak RCTJSCExecutor *weakSelf = self;
195195
[self executeBlockOnJavaScriptQueue: ^{
196-
RCTContextExecutor *strongSelf = weakSelf;
196+
RCTJSCExecutor *strongSelf = weakSelf;
197197
if (!strongSelf) {
198198
return;
199199
}
@@ -216,9 +216,9 @@ - (instancetype)initWithJavaScriptThread:(NSThread *)javaScriptThread
216216

217217
- (void)setUp
218218
{
219-
__weak RCTContextExecutor *weakSelf = self;
219+
__weak RCTJSCExecutor *weakSelf = self;
220220
[self executeBlockOnJavaScriptQueue:^{
221-
RCTContextExecutor *strongSelf = weakSelf;
221+
RCTJSCExecutor *strongSelf = weakSelf;
222222
if (!strongSelf.isValid) {
223223
return;
224224
}
@@ -369,9 +369,9 @@ - (void)_executeJSCall:(NSString *)method
369369
callback:(RCTJavaScriptCallback)onComplete
370370
{
371371
RCTAssert(onComplete != nil, @"onComplete block should not be nil");
372-
__weak RCTContextExecutor *weakSelf = self;
372+
__weak RCTJSCExecutor *weakSelf = self;
373373
[self executeBlockOnJavaScriptQueue:RCTProfileBlock((^{
374-
RCTContextExecutor *strongSelf = weakSelf;
374+
RCTJSCExecutor *strongSelf = weakSelf;
375375
if (!strongSelf || !strongSelf.isValid) {
376376
return;
377377
}
@@ -443,7 +443,7 @@ - (void)_executeJSCall:(NSString *)method
443443

444444
// Looks like making lots of JSC API calls is slower than communicating by using a JSON
445445
// string. Also it ensures that data stuctures don't have cycles and non-serializable fields.
446-
// see [RCTContextExecutorTests testDeserializationPerf]
446+
// see [RCTJSCExecutorTests testDeserializationPerf]
447447
id objcValue;
448448
// We often return `null` from JS when there is nothing for native side. JSONKit takes an extra hundred microseconds
449449
// to handle this simple case, so we are adding a shortcut to make executeJSCall method even faster
@@ -468,9 +468,9 @@ - (void)executeApplicationScript:(NSData *)script
468468
RCTAssertParam(script);
469469
RCTAssertParam(sourceURL);
470470

471-
__weak RCTContextExecutor *weakSelf = self;
471+
__weak RCTJSCExecutor *weakSelf = self;
472472
[self executeBlockOnJavaScriptQueue:RCTProfileBlock((^{
473-
RCTContextExecutor *strongSelf = weakSelf;
473+
RCTJSCExecutor *strongSelf = weakSelf;
474474
if (!strongSelf || !strongSelf.isValid) {
475475
return;
476476
}
@@ -532,9 +532,9 @@ - (void)injectJSONText:(NSString *)script
532532
RCTAssert(RCTJSONParse(script, NULL) != nil, @"%@ wasn't valid JSON!", script);
533533
}
534534

535-
__weak RCTContextExecutor *weakSelf = self;
535+
__weak RCTJSCExecutor *weakSelf = self;
536536
[self executeBlockOnJavaScriptQueue:RCTProfileBlock((^{
537-
RCTContextExecutor *strongSelf = weakSelf;
537+
RCTJSCExecutor *strongSelf = weakSelf;
538538
if (!strongSelf || !strongSelf.isValid) {
539539
return;
540540
}

0 commit comments

Comments
 (0)