File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Core/JsRuntime/Include/Babylon Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ namespace Babylon
4848 // **IMPORTANT**:
4949 // 1. To prevent continuations from accessing freed memory, the destructor of the N-API class is expected to call
5050 // `Rundown()` which blocks execution until all of its schedulers are invoked. Failing to do so will result in
51- // an exception if there are outstanding schedulers not yet invoked.
51+ // an assert if there are outstanding schedulers not yet invoked.
5252 // 2. The last continuation that accesses members of the N-API object, including the cancellation associated with
5353 // the continuation, must capture a persistent reference to the N-API object itself to prevent the GC from
5454 // collecting the N-API object during the asynchronous operation. Failing to do so will result in a hang
@@ -68,10 +68,7 @@ namespace Babylon
6868
6969 ~JsRuntimeScheduler ()
7070 {
71- if (m_count > 0 )
72- {
73- throw std::runtime_error{" Schedulers for the JavaScript thread are not yet invoked" };
74- }
71+ assert (m_count == 0 && " Schedulers for the JavaScript thread are not yet invoked" );
7572 }
7673
7774 // Wait until all of the schedulers are invoked.
You can’t perform that action at this time.
0 commit comments