Skip to content

src: fix near heap limit callback

  • Use the allocated space size to calculate the raised heap limit, as that is what V8 uses to determine whether it should crash - previously we use the used size for the calculation and that was too conservative and did not prevent the crashes effectively enough.
  • Use RequestInterrupt() to take the snapshot since we need to make sure that the heap limit is raised first before the snapshot can be taken.

Refs: https://github.com/nodejs/node/pull/42115 Fixes: https://github.com/nodejs/node-v8/issues/218

Merge request reports

Loading