Skip to content
Snippets Groups Projects
Commit ad90bf12 authored by Serge S. Gulin's avatar Serge S. Gulin :construction_worker:
Browse files

JS: heap and stack overflows reporting defined as js hard failure (fixes #24602)

These errors were treated as a hard failure for browser application. The fix is trivial: just throw error.
parent a45a5712
No related branches found
No related tags found
No related merge requests found
......@@ -670,6 +670,10 @@ rts_gen s = do
, r1 |= x
, returnS (stack .! sp)
])
, closure (ClosureInfo (global "h$reportHeapOverflow") (CIRegs 0 [PtrV]) "h$reportHeapOverflow" (CILayoutFixed 0 []) CIStackFrame mempty)
(return $ (appS "throw" [jString "h$reportHeapOverflow: Heap Overflow!"]))
, closure (ClosureInfo (global "h$reportStackOverflow") (CIRegs 0 [PtrV]) "h$reportStackOverflow" (CILayoutFixed 0 []) CIStackFrame mempty)
(return $ (appS "throw" [jString "h$reportStackOverflow: Stack Overflow!"]))
-- Top-level statements to generate only in profiling mode
, fmap (profStat s) $ (closure (ClosureInfo (global "h$setCcs_e") (CIRegs 0 [PtrV]) "set cost centre stack" (CILayoutFixed 1 [ObjV]) CIStackFrame mempty)
(return $
......
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