Replace assert calls with RCTAssert in RCTSurfaceTouchHandler
Summary:
Changelog: [Internal] Replace assert calls with RCTAssert in RCTSurfaceTouchHandler
We've been recieving crash report tasks related to these calls but it appears (based on D19221204 (23d2a6248c
)) that the expectation was that these should be stripped in production and don't cause real problems. RCTAssert does not have that same issue.
Reviewed By: fkgozali
Differential Revision: D43167817
fbshipit-source-id: 45b1b4a3060cfd1e01356c003d63fa4b91c4222a
This commit is contained in:
Родитель
6faddc3870
Коммит
d92cb7360c
|
@ -592,7 +592,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithTarget : (id)target action : (SEL)act
|
|||
{
|
||||
for (UITouch *touch in touches) {
|
||||
auto iterator = _activeTouches.find(touch);
|
||||
assert(iterator != _activeTouches.end() && "Inconsistency between local and UIKit touch registries");
|
||||
RCTAssert(iterator != _activeTouches.end(), @"Inconsistency between local and UIKit touch registries");
|
||||
if (iterator == _activeTouches.end()) {
|
||||
continue;
|
||||
}
|
||||
|
@ -605,7 +605,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithTarget : (id)target action : (SEL)act
|
|||
{
|
||||
for (UITouch *touch in touches) {
|
||||
auto iterator = _activeTouches.find(touch);
|
||||
assert(iterator != _activeTouches.end() && "Inconsistency between local and UIKit touch registries");
|
||||
RCTAssert(iterator != _activeTouches.end(), @"Inconsistency between local and UIKit touch registries");
|
||||
if (iterator == _activeTouches.end()) {
|
||||
continue;
|
||||
}
|
||||
|
@ -640,7 +640,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithTarget : (id)target action : (SEL)act
|
|||
|
||||
for (UITouch *touch in touches) {
|
||||
auto iterator = _activeTouches.find(touch);
|
||||
assert(iterator != _activeTouches.end() && "Inconsistency between local and UIKit touch registries");
|
||||
RCTAssert(iterator != _activeTouches.end(), @"Inconsistency between local and UIKit touch registries");
|
||||
if (iterator == _activeTouches.end()) {
|
||||
continue;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче