[Bridge] Make RCTJavaScriptDidFailToLoadNotification match DidLoad notif

Summary:
Add the RCTBatchedBridge object to the notification's userInfo for consistency with RCTJavaScriptDidLoadNotification, and set the target object to `_parentBridge`.

cc @nicklockwood @tadeuzagallo
Closes https://github.com/facebook/react-native/pull/1243
Github Author: James Ide <ide@jameside.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
This commit is contained in:
James Ide 2015-05-13 08:25:27 -07:00 committed by Christopher Chedeau
parent ba9ef00ab9
commit f40a7b4609

View File

@ -1122,9 +1122,9 @@ RCT_INNER_BRIDGE_ONLY(_invokeAndProcessModule:(NSString *)module method:(NSStrin
withDetails:[error localizedFailureReason]];
}
NSDictionary *userInfo = @{@"error": error};
NSDictionary *userInfo = @{@"bridge": self, @"error": error};
[[NSNotificationCenter defaultCenter] postNotificationName:RCTJavaScriptDidFailToLoadNotification
object:self
object:_parentBridge
userInfo:userInfo];
} else {