Open Bug 1999824 Opened 23 days ago Updated 17 days ago

Use requestInterrupt() for capturing OOM stack trace

Categories

(Core :: JavaScript Engine, enhancement, P2)

enhancement

Tracking

()

People

(Reporter: bthrall, Unassigned)

References

(Depends on 1 open bug)

Details

It would be much less risky to use JSContext::requestInterrupt() when handling OOM, then capture the stack trace during the interrupt (which we already know is safe). It looks like we already check interrupts when exceptions happen.

The main concern with the interrupt-based approach is the stack trace might not be as accurate, since it will be captured during the interrupt instead of exactly when the OOM happens. However, this might not be a problem since the OOM is an exception, so there won't be much code executing between when the exception is thrown and when it is handled.

Summary: Use requestInterupt() for capturing OOM stack trace → Use requestInterrupt() for capturing OOM stack trace

I like this idea. It also means we can put back some of the #ifdefs for AutoUnsafeCallWithABI to avoid overhead in release builds.

Priority: -- → P2
You need to log in before you can comment on or make changes to this bug.