jerryscript-project / iotjs

Platform for Internet of Things with JavaScript http://www.iotjs.net
Other
2.59k stars 439 forks source link

[WIP] Possible fix for closing a frozen handle #1925

Closed DanielBallaSZTE closed 4 years ago

DanielBallaSZTE commented 5 years ago

So #1907 is a pretty complex issue. A bound udp socket gets frozen, and on that frozen object a close() is called. Due to the freeze the object's properties can not be changed, including the native handle, namely ._handle

This fix is not nice IMHO, but solves the above issue. I'm open to any suggestions on this PR.

IoT.js-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu

DanielBallaSZTE commented 5 years ago

Also, this issue might be reproducible with other IO handles.

hs0225 commented 5 years ago

@DanielBallaSZTE If you can catch an exception when compiling a JavaScript, can you solve it by catching an exception there and throwing an error?

DanielBallaSZTE commented 4 years ago

This issue can also be fixed with the help of https://github.com/jerryscript-project/jerryscript/pull/3128 . Will update the PR soon.

DanielBallaSZTE commented 4 years ago

Closing this patch, since a bigger rework would be needed for those handles.