Skip to content
Snippets Groups Projects
Commit aaf7702b authored by deuce's avatar deuce
Browse files

Report an exception if the malloc() fails.

The calling code must check JS_IsExceptionPending(cx) and return JS_FALSE
parent 406c135c
No related branches found
No related tags found
No related merge requests found
...@@ -128,6 +128,7 @@ extern int thread_suid_broken; /* NPTL is no longer broken */ ...@@ -128,6 +128,7 @@ extern int thread_suid_broken; /* NPTL is no longer broken */
(ret)[JSSTSpos]=(char)JSSTSstrval[JSSTSpos]; \ (ret)[JSSTSpos]=(char)JSSTSstrval[JSSTSpos]; \
(ret)[*JSSTSlenptr]=0; \ (ret)[*JSSTSlenptr]=0; \
} \ } \
else JS_ReportError(cx, "Error alocating %lu bytes at %s:%d", (*JSSTSlenptr)+1, getfname(__FILE__), __LINE__); \
} \ } \
} \ } \
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment