I am migrating my V8 code from using "plain scripts" to using "ES6 Modules". There are a few concepts that I am struggling with.
First, how might I retrieve a class definition defined in a module? Previously I would have used the "global" object on the "context" (i.e. context->Global()), and found the class definition there. I can't find a good example on how to do that in a module. I am experimenting with Module::GetModuleNamespace(), but I'm not sure that I'm on the right track. Second, am I allowed to take a persistent handle to a module? I am finding that after restoring a module from a persistent handle, I encounter the failure below. # # Fatal error in C:\621300de\v8\src/api/api-inl.h, line 128 # Debug check failed: allow_empty_handle || that != nullptr. # # # #FailureMessage Object: 0000006114FBC2E0 ==== C stack trace =============================== v8::base::debug::StackTrace::StackTrace [0x0,000,7FF,60D,F82,80B+27] v8::platform::DefaultPlatform::PostJob [0x0,000,7FF,60D,F7F,1E1+401] V8_Fatal [0x0,000,7FF,60C,251,B87+167] v8::base::PrintCheckOperand<unsigned __int64> [0x0,000,7FF,60C,251,683+627] v8::Module::GetStatus [0x0,000,7FF,60C,1E0,3FD+141] v8::Module::GetModuleNamespace [0x0,000,7FF,60C,1D1,243+19] -- -- v8-users mailing list v8-users@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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/6e1f91bb-9d1b-4e3e-b772-c1cdf71afb06n%40googlegroups.com.