diff --git a/node_patches/node10.15.3_modified/src/node.cc b/node_patches/node10.15.3_modified/src/node.cc index ed8f2d48..867cf5a7 100644 --- a/node_patches/node10.15.3_modified/src/node.cc +++ b/node_patches/node10.15.3_modified/src/node.cc @@ -131,6 +131,9 @@ typedef int mode_t; //#espresso ,#1 #include "../src/libespresso/bridge2.h" void DoEngineSetupCallback(JsEngine* engine, JsContext* jsContext); +void DoEngineClosingCallback(JsEngine* engine, + JsContext* jsContext, + int exitCode); ////////////////////////////////// namespace node { @@ -2905,6 +2908,11 @@ inline int Start(Isolate* isolate, IsolateData* isolate_data, const int exit_code = EmitExit(&env); + //////////////////////////////// + //#espresso ,#3 + DoEngineClosingCallback(jsEngine, jscontext, exit_code); + //////////////////////////////// + WaitForInspectorDisconnect(&env); env.set_can_call_into_js(false);