a question about Isolate RequestInterrupt

132 views
Skip to first unread message

anarkh the

unread,
Jan 12, 2022, 1:00:46 PM1/12/22
to v8-users
hi, i have a question about Isolate RequestInterrupt API. what do the "Registered |callback| must not reenter interrupted Isolate." mean? can i call RequestInterrupt again in RequestInterrupt callback.  I think it is ok. And i find some code in v8 source code. 
飞书20220113-015705.png

alex...@gmail.com

unread,
Jan 12, 2022, 3:07:22 PM1/12/22
to v8-users
I think it means that JavaScript code should not be called and maybe even messing with data in the heap is a bad idea. Not sure about the latter. I think the heap and JS stack are in indeterminate or at least intermediate states that wouldn't tolerate interlopers when you enter the callback so running JS code from there is a bad idea. It looks like you probably could invoke RequestInterrupt inside the callback though that seems like a bit of an oddball thing to do.

HTH  

Message has been deleted

anarkh the

unread,
Jan 12, 2022, 11:20:50 PM1/12/22
to v8-users
thanks, i have modified the code. 
And i have another question. Im a nodejser, i want to use RequestInterrupt callback to do something by js code, because Node.js don not export the public C++ API but export a js Public API. If i can not call js code in RequestInterrupt callback, can i have other ways to do this ?
Reply all
Reply to author
Forward
0 new messages