Commit 876766e1 authored by Deucе's avatar Deucе 👌🏾

May as well check the signature in the OnExit handler too.

parent 34801e27
Pipeline #692 passed with stage
in 16 minutes and 53 seconds
......@@ -799,7 +799,7 @@ void DLLCALL js_EvalOnExit(JSContext *cx, JSObject *obj, js_callback_t* cb)
BOOL auto_terminate=cb->auto_terminate;
JSObject *glob=JS_GetGlobalObject(cx);
global_private_t *pt;
str_list_t list;
str_list_t list = NULL;
if(glob==obj) {
pt=(global_private_t *)JS_GetPrivate(cx,JS_GetGlobalObject(cx));
......@@ -807,11 +807,17 @@ void DLLCALL js_EvalOnExit(JSContext *cx, JSObject *obj, js_callback_t* cb)
}
else {
struct onexit_private *oep = JS_GetPrivate(cx,obj);
if (oep == NULL)
list = NULL;
else {
list = oep->list;
free(oep);
if (oep != NULL) {
if (oep->signature[0] == 'o'
Please register or sign in to reply
|| oep->signature[1] == 'n'
|| oep->signature[2] == 'e'
|| oep->signature[3] == 'x'
|| oep->signature[4] == 'i'
|| oep->signature[5] == 't'
|| oep->signature[6] == 0) {
list = oep->list;
free(oep);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment