node.js access to v8's "raw" CallSites -- useful for custom traces, c-style assertions, getting the line number in execution etc
by tjJavaScript
Last 12 weeks · 0 commits
2 of 6 standards met
Repository: tj/callsite. Description: node.js access to v8's "raw" CallSites -- useful for custom traces, c-style assertions, getting the line number in execution etc Stars: 248, Forks: 11. Primary language: JavaScript. Languages: JavaScript (96.7%), Makefile (3.3%). License: MIT. Open PRs: 1, open issues: 6. Last activity: 11y ago. Community health: 42%. Top contributors: tj, humanchimp, tchollingsworth, prescod.
I am working on a game that uses the callstack to perform security checks. I create virtual filenames to store a filename and an instance ID so I can locate the actual object instance using the information provided by callsite. I do not appear to be getting the entire stack trace, though (my virtual scripts don't appear in the trace, now). I am running Node 8.9.3 on Windows 10 for development. Produces a stack like: Visual Studio on the other hand shows my callstack with more than twice as many frames (see attached). Why the discrepancy? How do I get ALL the frames on the stack? !callstack2vs (Updated with better example)