(might be better suited to v8-dev)
For a research project, I'm trying to get the currently executing script's
ID from a microtask in V8 isolate.cc. I've thought of the following two
approaches:
if (!this->context().is_null()) {
Handle<ScopeInfo> scope_info(this->context().scope_info(), this);
DeclarationScope* decl_scope = scope_info->GetScriptScope();
//but now how do I get to the currently executing script?
}
and:
Handle<CallableTask> current_microtask =
Handle<CallableTask>::cast(this->factory()->current_microtask());
JSReceiver receiver = current_microtask->callable();
MaybeHandle<JSFunction> maybe_constructor =
JSReceiver::GetConstructor(handle(receiver, this));
//but constructor->shared().script().IsScript() returns false.
What am I doing wrong?
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/v8-dev/e782e222-d62b-453e-b5e7-f37097869894n%40googlegroups.com.