PromucFlow_constructor/app/client/src/workers/Evaluation/fns
arunvjn 713ca6ffc4
chore: type check callback functions in setInterval and setTimeout before invoking. (#20592)
## Description
We have recently changed the implementation for setInterval in
https://github.com/appsmithorg/appsmith/pull/20168.
This has the potential to blow up our sentry quota if someone sets up an
empty setInterval function with no callback in it and execute it. This
PR adds a type check before invoking the callback to ensure that the
passed in callback is indeed, a function.

Fixes https://github.com/appsmithorg/appsmith/issues/20591

https://appsmith.sentry.io/issues/3928721303/?project=1546547&query=is%3Aunresolved+worker&referrer=issue-stream&statsPeriod=14d

Media
> A video or a GIF is preferred. when using Loom, don’t embed because it
looks like it’s a GIF. instead, just link to the video

## Type of change
- Chore (housekeeping or task changes that don't impact user perception)

## How Has This Been Tested?
- Manual

### Test Plan
> Add Testsmith test cases links that relate to this PR

### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)


## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
2023-02-16 16:45:01 +05:30
..
__tests__ fix: access outer scope variables inside callbacks (#20168) 2023-02-12 00:03:20 +05:30
overrides chore: type check callback functions in setInterval and setTimeout before invoking. (#20592) 2023-02-16 16:45:01 +05:30
utils chore: export batching method for ee PR (#20631) 2023-02-15 21:57:27 +05:30
actionFns.ts fix: access outer scope variables inside callbacks (#20168) 2023-02-12 00:03:20 +05:30
copyToClipboard.ts fix: access outer scope variables inside callbacks (#20168) 2023-02-12 00:03:20 +05:30
download.ts fix: access outer scope variables inside callbacks (#20168) 2023-02-12 00:03:20 +05:30
geolocationFns.ts fix: access outer scope variables inside callbacks (#20168) 2023-02-12 00:03:20 +05:30
index.ts fix: access outer scope variables inside callbacks (#20168) 2023-02-12 00:03:20 +05:30
mock.ts fix: access outer scope variables inside callbacks (#20168) 2023-02-12 00:03:20 +05:30
modalFns.ts fix: access outer scope variables inside callbacks (#20168) 2023-02-12 00:03:20 +05:30
navigateTo.ts fix: access outer scope variables inside callbacks (#20168) 2023-02-12 00:03:20 +05:30
postWindowMessage.ts fix: access outer scope variables inside callbacks (#20168) 2023-02-12 00:03:20 +05:30
resetWidget.ts fix: access outer scope variables inside callbacks (#20168) 2023-02-12 00:03:20 +05:30
showAlert.ts fix: access outer scope variables inside callbacks (#20168) 2023-02-12 00:03:20 +05:30
storeFns.ts fix: access outer scope variables inside callbacks (#20168) 2023-02-12 00:03:20 +05:30