Getting to script from isolate scope

13 views
Skip to first unread message

Shivan

unread,
Jul 21, 2021, 9:36:09 PM7/21/21
to v8-users
Hello,

I'm trying to get the currently executing script's ID from a microtask in V8. I've tried getting the isolate's context() and the script source from there, but I'm struggling to find the link to the script itself (and its id).

Code (this is isolate.cc):
if (!this->context().is_null()) {
    Handle<ScopeInfo> scope_info(this->context().scope_info(), this);
    DeclarationScope* decl_scope = scope_info->GetScriptScope();
}
Reply all
Reply to author
Forward
0 new messages