Isolate* isolate = info.GetIsolate();
Local<StackTrace> stack = v8::StackTrace::CurrentStackTrace(isolate, 10, v8::StackTrace::StackTraceOptions::kDetailed);
for (int i = 0; i < stack->GetFrameCount(); i++) {
Local<v8::StackFrame> frame = stack->GetFrame(isolate, i);
Local<v8::String> funcName = frame->GetFunctionName();
v8::String::Utf8Value str(isolate, funcName);
const char* name = *str;
printf("%s (%d:%d)\n", name, frame->GetLineNumber(), frame->GetColumn());
}
--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/64d9e4ca-b271-4d83-aace-753c28e193f4%40googlegroups.com.
This is a bug in our API implementation. Or better, there is a mismatch between API and what we do internally. "Method names" and "class names" are stored separately from function names. This can be seen here, when we collect all the information for a single frame: https://cs.chromium.org/chromium/src/v8/src/heap/factory.cc?rcl=e1eb815647f334a8cf970439343a8febfa9f6d11&l=3732There is really no reason why this information shouldn't be made available in the API. The only tricky thing is to come up with a better API, as some of the getters change meaning depending whether its a JS or WASM frame and I am not really happy with the current solution.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-u...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/358d6517-c279-459b-a675-9ad4d712638d%40googlegroups.com.
+Leszek SwirskiI am unsure what impact lazy compilation has here. There might be a weird interaction with the stack frame cache. Does the flag "--optimize-for-size" cause any change in the result? That flag disables the stack frame cache (among other things).
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/358d6517-c279-459b-a675-9ad4d712638d%40googlegroups.com.