Skip to content

Commit 0c4b819

Browse files
committed
fix: don't suppress timer exceptions
1 parent 0de1cc3 commit 0c4b819

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

NativeScript/runtime/Timers.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ void TimerCallback(CFRunLoopTimerRef timer, void *info) {
161161
v8::Local<v8::Function> cb = task->callback_.Get(isolate);
162162
v8::Local<v8::Context> context = cb->GetCreationContextChecked();
163163
Context::Scope context_scope(context);
164-
TryCatch tc(isolate);
165164
auto argc = task->args_.get() == nullptr ? 0 : task->args_->size();
166165
if (argc > 0) {
167166
Local<Value> argv[argc];
@@ -172,11 +171,11 @@ void TimerCallback(CFRunLoopTimerRef timer, void *info) {
172171
} else {
173172
(void)cb->Call(context, context->Global(), 0, nullptr);
174173
}
175-
tc.ReThrow();
176174

177175
if (!task->repeats_) {
178176
data->state->removeTask(task);
179177
}
178+
180179
}
181180

182181
void Timers::SetTimer(const v8::FunctionCallbackInfo<v8::Value>& args, bool repeatable) {

0 commit comments

Comments
 (0)