src,lib: fix assert when Error.prepareStackTrace
not overridden
#49212
+21
−4
Error.prepareStackTrace
not overridden
#49212