rspack
rspack copied to clipboard
add napi value object lifetime management tests
The napi binding implementation is already very complex now and may cause memory leak and segment fault behavior, we need add some tests about it which includes
- napi value and related resource(compiler & compilation) is collected in time when related js object is gc collected
- js object can be gc collected rightly( not cycle reference) if not reference from js side
- access binding value from js api wouldn't cause segmentfault