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:
Vincent Riemer 2023-02-09 15:28:05 -08:00 коммит произвёл Facebook GitHub Bot
Родитель 6faddc3870
Коммит d92cb7360c
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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;
}