mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
report: get stack trace with cross origin contexts
When a new context with a different security token is entered, or when no context is entered, `StackTrace::CurrentStackTrace` need to be explicitly set with flag `kExposeFramesAcrossSecurityOrigins` to avoid crashing. PR-URL: https://github.com/nodejs/node/pull/44398 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
This commit is contained in:
1 parent
5355a46840
commit
0e2c2064bb
4 files changed
+57
-12
No files matched your search
@@ -471,6 +471,11 @@ void OOMErrorHandler(const char* location, bool is_heap_oom) {
|
||||
}
|
||||
|
||||
if (report_on_fatalerror) {
|
||||
// Trigger report with the isolate. Environment::GetCurrent may return
|
||||
// nullptr here:
|
||||
// - If the OOM is reported by a young generation space allocation,
|
||||
// Isolate::GetCurrentContext returns an empty handle.
|
||||
// - Otherwise, Isolate::GetCurrentContext returns a non-empty handle.
|
||||
TriggerNodeReport(isolate, message, "OOMError", "", Local<Object>());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user