mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Log bridge description for e2e reloads
Reviewed By: mhorowitz Differential Revision: D7577953 fbshipit-source-id: 96871c664cb7ec84570bc76f2edb36ff8c8c6aeb
This commit is contained in:
committed by
Facebook Github Bot
parent
6924d44b20
commit
edd22bf49d
@@ -72,6 +72,12 @@ RCT_EXTERN NSString *const RCTBridgeDidDownloadScriptNotification;
|
||||
*/
|
||||
RCT_EXTERN NSString *const RCTBridgeDidDownloadScriptNotificationSourceKey;
|
||||
|
||||
/**
|
||||
* Key for the bridge description (NSString_ in the
|
||||
* RCTBridgeDidDownloadScriptNotification userInfo dictionary.
|
||||
*/
|
||||
RCT_EXTERN NSString *const RCTBridgeDidDownloadScriptNotificationBridgeDescriptionKey;
|
||||
|
||||
/**
|
||||
* This block can be used to instantiate modules that require additional
|
||||
* init parameters, or additional configuration prior to being used.
|
||||
|
||||
@@ -31,6 +31,7 @@ NSString *const RCTBridgeWillReloadNotification = @"RCTBridgeWillReloadNotificat
|
||||
NSString *const RCTBridgeWillDownloadScriptNotification = @"RCTBridgeWillDownloadScriptNotification";
|
||||
NSString *const RCTBridgeDidDownloadScriptNotification = @"RCTBridgeDidDownloadScriptNotification";
|
||||
NSString *const RCTBridgeDidDownloadScriptNotificationSourceKey = @"source";
|
||||
NSString *const RCTBridgeDidDownloadScriptNotificationBridgeDescriptionKey = @"bridgeDescription";
|
||||
|
||||
static NSMutableArray<Class> *RCTModuleClasses;
|
||||
NSArray<Class> *RCTGetModuleClasses(void)
|
||||
|
||||
@@ -400,7 +400,11 @@ struct RCTInstanceCallback : public InstanceCallback {
|
||||
[performanceLogger markStopForTag:RCTPLScriptDownload];
|
||||
[performanceLogger setValue:source.length forTag:RCTPLBundleSize];
|
||||
|
||||
NSDictionary *userInfo = source ? @{ RCTBridgeDidDownloadScriptNotificationSourceKey: source } : nil;
|
||||
NSDictionary *userInfo = @{
|
||||
RCTBridgeDidDownloadScriptNotificationSourceKey: source ?: [NSNull null],
|
||||
RCTBridgeDidDownloadScriptNotificationBridgeDescriptionKey: self->_bridgeDescription ?: [NSNull null],
|
||||
};
|
||||
|
||||
[center postNotificationName:RCTBridgeDidDownloadScriptNotification object:self->_parentBridge userInfo:userInfo];
|
||||
|
||||
_onSourceLoad(error, source);
|
||||
|
||||
Reference in New Issue
Block a user