[fbobjc] revert rFBOBJCdba3daf9a595f452d069f2a74a9a11f251999b2e

This commit is contained in:
Ben Hiller
2015-04-07 21:42:11 -07:00
parent 009f8ebe63
commit 220e116dce
7 changed files with 38 additions and 52 deletions

View File

@@ -610,6 +610,7 @@ static id<RCTJavaScriptExecutor> _latestJSExecutor;
selector:@selector(reload)
name:RCTReloadNotification
object:nil];
;
}
}];
}
@@ -618,8 +619,6 @@ static id<RCTJavaScriptExecutor> _latestJSExecutor;
- (void)bindKeys
{
#if TARGET_IPHONE_SIMULATOR
__weak RCTBridge *weakSelf = self;
// Workaround around the first cmd+r not working: http://openradar.appspot.com/19613391
// You can register just the cmd key and do nothing. This will trigger the bug and cmd+r
// will work like a charm!
@@ -628,33 +627,27 @@ static id<RCTJavaScriptExecutor> _latestJSExecutor;
action:^(UIKeyCommand *command) {
// Do nothing
}];
[[RCTKeyCommands sharedInstance] registerKeyCommandWithInput:@"r"
modifierFlags:UIKeyModifierCommand
action:^(UIKeyCommand *command) {
[weakSelf reload];
[self reload];
}];
[[RCTKeyCommands sharedInstance] registerKeyCommandWithInput:@"n"
modifierFlags:UIKeyModifierCommand
action:^(UIKeyCommand *command) {
RCTBridge *strongSelf = weakSelf;
if (!strongSelf) {
return;
}
strongSelf->_executorClass = Nil;
[strongSelf reload];
_executorClass = Nil;
[self reload];
}];
[[RCTKeyCommands sharedInstance] registerKeyCommandWithInput:@"d"
modifierFlags:UIKeyModifierCommand
action:^(UIKeyCommand *command) {
RCTBridge *strongSelf = weakSelf;
if (!strongSelf) {
return;
}
strongSelf->_executorClass = NSClassFromString(@"RCTWebSocketExecutor");
if (!strongSelf->_executorClass) {
_executorClass = NSClassFromString(@"RCTWebSocketExecutor");
if (!_executorClass) {
RCTLogError(@"WebSocket debugger is not available. Did you forget to include RCTWebSocketExecutor?");
}
[strongSelf reload];
[self reload];
}];
#endif
}
@@ -669,7 +662,7 @@ static id<RCTJavaScriptExecutor> _latestJSExecutor;
- (void)dealloc
{
[self invalidate];
RCTAssert(!self.valid, @"must call -invalidate before -dealloc");
}
#pragma mark - RCTInvalidating
@@ -681,15 +674,6 @@ static id<RCTJavaScriptExecutor> _latestJSExecutor;
- (void)invalidate
{
if (!self.isValid && _modulesByID == nil) {
return;
}
if (![NSThread isMainThread]) {
[self performSelectorOnMainThread:@selector(invalidate) withObject:nil waitUntilDone:YES];
return;
}
[[NSNotificationCenter defaultCenter] removeObserver:self];
// Wait for queued methods to finish