Skip to content

Commit f323af5

Browse files
RSNarafacebook-github-bot
authored andcommitted
Refactor: RuntimeScheduler: Delete ErrorUtils.h
Summary: RuntimeScheduler's ErrorUtils.h is redundant. Let's just remove it. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D55547905
1 parent db128ed commit f323af5

File tree

4 files changed

+4
-42
lines changed

4 files changed

+4
-42
lines changed

packages/react-native/ReactCommon/react/renderer/runtimescheduler/ErrorUtils.h

Lines changed: 0 additions & 36 deletions
This file was deleted.

packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <react/featureflags/ReactNativeFeatureFlags.h>
1414
#include <react/renderer/debug/SystraceSection.h>
1515
#include <utility>
16-
#include "ErrorUtils.h"
1716

1817
namespace facebook::react {
1918

packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Legacy.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
#include "RuntimeScheduler_Legacy.h"
99
#include "SchedulerPriorityUtils.h"
1010

11+
#include <cxxreact/ErrorUtils.h>
1112
#include <react/renderer/consistency/ScopedShadowTreeRevisionLock.h>
1213
#include <react/renderer/debug/SystraceSection.h>
1314
#include <utility>
14-
#include "ErrorUtils.h"
1515

1616
namespace facebook::react {
1717

@@ -139,7 +139,7 @@ void RuntimeScheduler_Legacy::callExpiredTasks(jsi::Runtime& runtime) {
139139
executeTask(runtime, topPriorityTask, didUserCallbackTimeout);
140140
}
141141
} catch (jsi::JSError& error) {
142-
handleFatalError(runtime, error);
142+
handleJSError(runtime, error, true);
143143
}
144144

145145
currentPriority_ = previousPriority;
@@ -191,7 +191,7 @@ void RuntimeScheduler_Legacy::startWorkLoop(jsi::Runtime& runtime) {
191191
executeTask(runtime, topPriorityTask, didUserCallbackTimeout);
192192
}
193193
} catch (jsi::JSError& error) {
194-
handleFatalError(runtime, error);
194+
handleJSError(runtime, error, true);
195195
}
196196

197197
currentPriority_ = previousPriority;

packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include <react/renderer/debug/SystraceSection.h>
1515
#include <react/utils/OnScopeExit.h>
1616
#include <utility>
17-
#include "ErrorUtils.h"
1817

1918
namespace facebook::react {
2019

@@ -211,7 +210,7 @@ void RuntimeScheduler_Modern::startWorkLoop(
211210
executeTask(runtime, topPriorityTask, currentTime);
212211
}
213212
} catch (jsi::JSError& error) {
214-
handleFatalError(runtime, error);
213+
handleJSError(runtime, error, true);
215214
}
216215

217216
currentPriority_ = previousPriority;

0 commit comments

Comments
 (0)