report: fix missing section javascriptHeap on OOMError
report: fix missing section javascriptHeap on OOMError
Environment::GetCurrent
may not available in the context of OOM.
Removes the cyclic Environment::GetCurrent
and env->isolate()
calls to ensure both isolate
and env
is present if available.
However, this behavior is not guaranteed. As
Environment::GetCurrent
didn't allocate new handles in the heap,
when a Context is entered it can still get the valid env pointer.
Removes the unstable assertion of the absence of env in the test.
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.