Skip to content

Commit

Permalink
fix: don't suppress timer exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
edusperoni committed Aug 4, 2023
1 parent 0de1cc3 commit 0c4b819
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions NativeScript/runtime/Timers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ void TimerCallback(CFRunLoopTimerRef timer, void *info) {
v8::Local<v8::Function> cb = task->callback_.Get(isolate);
v8::Local<v8::Context> context = cb->GetCreationContextChecked();
Context::Scope context_scope(context);
TryCatch tc(isolate);
auto argc = task->args_.get() == nullptr ? 0 : task->args_->size();
if (argc > 0) {
Local<Value> argv[argc];
Expand All @@ -172,11 +171,11 @@ void TimerCallback(CFRunLoopTimerRef timer, void *info) {
} else {
(void)cb->Call(context, context->Global(), 0, nullptr);
}
tc.ReThrow();

if (!task->repeats_) {
data->state->removeTask(task);
}

}

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

0 comments on commit 0c4b819

Please sign in to comment.