Remove more weakSelf/strongSelf errors

Reviewed By: mmmulani

Differential Revision: D3555000

fbshipit-source-id: 13b75571a0d09374ee82977cb2acbf1f894479ca
This commit is contained in:
Pieter De Baets
2016-07-13 08:01:44 -07:00
committed by Facebook Github Bot 2
parent 8baaad9b0f
commit ceffb085d0
2 changed files with 25 additions and 27 deletions

View File

@@ -476,19 +476,28 @@ RCT_EXPORT_MODULE()
if (_liveReloadURL) {
NSString *liveReloadTitle = _liveReloadEnabled ? @"Disable Live Reload" : @"Enable Live Reload";
[items addObject:[RCTDevMenuItem buttonItemWithTitle:liveReloadTitle handler:^{
weakSelf.liveReloadEnabled = !self->_liveReloadEnabled;
__typeof(self) strongSelf = weakSelf;
if (strongSelf) {
strongSelf.liveReloadEnabled = !strongSelf->_liveReloadEnabled;
}
}]];
NSString *profilingTitle = RCTProfileIsProfiling() ? @"Stop Systrace" : @"Start Systrace";
[items addObject:[RCTDevMenuItem buttonItemWithTitle:profilingTitle handler:^{
weakSelf.profilingEnabled = !self->_profilingEnabled;
__typeof(self) strongSelf = weakSelf;
if (strongSelf) {
strongSelf.profilingEnabled = !strongSelf->_profilingEnabled;
}
}]];
}
if ([self hotLoadingAvailable]) {
NSString *hotLoadingTitle = _hotLoadingEnabled ? @"Disable Hot Reloading" : @"Enable Hot Reloading";
[items addObject:[RCTDevMenuItem buttonItemWithTitle:hotLoadingTitle handler:^{
weakSelf.hotLoadingEnabled = !self->_hotLoadingEnabled;
__typeof(self) strongSelf = weakSelf;
if (strongSelf) {
strongSelf.hotLoadingEnabled = !strongSelf->_hotLoadingEnabled;
}
}]];
}