File tree Expand file tree Collapse file tree 6 files changed +11
-20
lines changed
Expand file tree Collapse file tree 6 files changed +11
-20
lines changed Original file line number Diff line number Diff line change 2020@class RCTEventDispatcher;
2121@class RCTPerformanceLogger;
2222
23- /* *
24- * This notification triggers a reload of all bridges currently running.
25- * Deprecated, use RCTBridge::requestReload instead.
26- */
27- RCT_EXTERN NSString *const RCTReloadNotification DEPRECATED_ATTRIBUTE;
28-
2923/* *
3024 * This notification fires when the bridge starts loading the JS bundle.
3125 */
@@ -203,7 +197,7 @@ RCT_EXTERN NSString *RCTBridgeModuleNameForClass(Class bridgeModuleClass);
203197/* *
204198 * Inform the bridge, and anything subscribing to it, that it should reload.
205199 */
206- - (void )requestReload ;
200+ - (void )requestReload __deprecated_msg( " Call reload instead " ) ;
207201
208202/* *
209203 * Says whether bridge has started recieving calls from javascript.
Original file line number Diff line number Diff line change 2121#import " RCTProfile.h"
2222#import " RCTUtils.h"
2323
24- NSString *const RCTReloadNotification = @" RCTReloadNotification" ;
2524NSString *const RCTJavaScriptWillStartLoadingNotification = @" RCTJavaScriptWillStartLoadingNotification" ;
2625NSString *const RCTJavaScriptDidLoadNotification = @" RCTJavaScriptDidLoadNotification" ;
2726NSString *const RCTJavaScriptDidFailToLoadNotification = @" RCTJavaScriptDidFailToLoadNotification" ;
@@ -200,7 +199,6 @@ - (void)dealloc
200199 * This runs only on the main thread, but crashes the subclass
201200 * RCTAssertMainQueue();
202201 */
203- [[NSNotificationCenter defaultCenter ] removeObserver: self ];
204202 [self invalidate ];
205203}
206204
@@ -216,7 +214,7 @@ - (void)bindKeys
216214 [commands registerKeyCommandWithInput: @" r"
217215 modifierFlags: UIKeyModifierCommand
218216 action: ^(__unused UIKeyCommand *command) {
219- [weakSelf requestReload ];
217+ [weakSelf reload ];
220218 }];
221219#endif
222220}
@@ -273,7 +271,6 @@ - (void)reload
273271
274272- (void )requestReload
275273{
276- [[NSNotificationCenter defaultCenter ] postNotificationName: RCTReloadNotification object: self ];
277274 [self reload ];
278275}
279276
Original file line number Diff line number Diff line change @@ -563,7 +563,7 @@ - (RCTDevMenuAlertActionHandler)alertActionHandlerForDevItem:(RCTDevMenuItem *__
563563
564564RCT_EXPORT_METHOD (reload)
565565{
566- [_bridge requestReload ];
566+ [_bridge reload ];
567567}
568568
569569RCT_EXPORT_METHOD (debugRemotely:(BOOL )enableDebug)
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ - (instancetype)initWithDelegate:(id<RCTExceptionsManagerDelegate>)delegate
5656 static NSUInteger reloadRetries = 0 ;
5757 if (!RCT_DEBUG && reloadRetries < _maxReloadAttempts) {
5858 reloadRetries++;
59- [_bridge requestReload ];
59+ [_bridge reload ];
6060 } else {
6161 NSString *description = [@" Unhandled JS Exception: " stringByAppendingString: message];
6262 NSDictionary *errorInfo = @{ NSLocalizedDescriptionKey : description, RCTJSStackTraceKey: stack };
Original file line number Diff line number Diff line change @@ -451,8 +451,9 @@ - (void)redBoxWindow:(__unused RCTRedBoxWindow *)redBoxWindow openStackFrameInEd
451451 [[[NSURLSession sharedSession ] dataTaskWithRequest: request] resume ];
452452}
453453
454- - (void )reloadFromRedBoxWindow : (__unused RCTRedBoxWindow *)redBoxWindow {
455- [_bridge requestReload ];
454+ - (void )reloadFromRedBoxWindow : (__unused RCTRedBoxWindow *)redBoxWindow
455+ {
456+ [_bridge reload ];
456457}
457458
458459@end
Original file line number Diff line number Diff line change 1010#import " RCTProfile.h"
1111
1212#import < dlfcn.h>
13-
1413#import < libkern/OSAtomic.h>
1514#import < mach/mach.h>
1615#import < objc/message.h>
1918#import < UIKit/UIKit.h>
2019
2120#import " RCTAssert.h"
22- #import " RCTBridge.h"
2321#import " RCTBridge+Private.h"
22+ #import " RCTBridge.h"
2423#import " RCTComponentData.h"
2524#import " RCTDefines.h"
25+ #import " RCTJSCExecutor.h"
2626#import " RCTLog.h"
2727#import " RCTModuleData.h"
28- #import " RCTUtils.h"
2928#import " RCTUIManager.h"
30- #import " RCTJSCExecutor .h"
29+ #import " RCTUtils .h"
3130
3231NSString *const RCTProfileDidStartProfiling = @" RCTProfileDidStartProfiling" ;
3332NSString *const RCTProfileDidEndProfiling = @" RCTProfileDidEndProfiling" ;
@@ -363,7 +362,7 @@ + (void)vsync:(CADisplayLink *)displayLink
363362
364363+ (void )reload
365364{
366- [RCTProfilingBridge () requestReload ];
365+ [RCTProfilingBridge () reload ];
367366}
368367
369368+ (void )toggle : (UIButton *)target
You can’t perform that action at this time.
0 commit comments