dop251 / goja_nodejs

Nodejs compatibility library for Goja
MIT License
329 stars 78 forks source link

Add nil checks for clearTimeout and clearInterval. #23

Closed psilva261 closed 3 years ago

psilva261 commented 3 years ago

Hi!

This adds nil checks to the arguments passed to clearTimeout/clearInterval for the use case of running buggy/untrusted JS code. I thought it would be better to do the check here - and not in the exported ClearTimeout/ClearInterval - because it's clearer what can break.

dop251 commented 3 years ago

Thanks!

psilva261 commented 3 years ago

Thanks for merging!