Hi Steve, Tip of tree for V8 recently turned on the top-level await feature <https://v8.dev/features/top-level-await> on by default. Previously it was gated behind the --harmony-top-level-await flag.
With top-level await, Module::Evaluate always returns a Promise object. This Promise is resolved when the module successfully evaluates, and is rejected otherwise. You can use the Promise API to attach then handlers. If the module graph you're evaluating is not asynchronous and doesn't have any modules with top-level await in, the Promise returned by Module::Evaluate is already settled, and you should be able to pull the result value out without attaching a handler. Hope this helps, shu On Tue, Apr 27, 2021 at 9:55 AM Steve M <menzies.stev...@gmail.com> wrote: > Hi, > > I'm transitioning from v8 version 8.2.0.0. After syncing to the latest > master branch, Mon Apr 26, I'm seeing the return value from > Module::Evaluate return an "object" type, when I expected to see a "string" > type. The module status is 'kEvaluated'. > > The actual script is just returning a completion value of type string. > > //------------------- > "Complete"; > > Previously, Evaluate was returning the expected string value. > > Evaluating the script using the ScriptCompiler::Run flow works as expected. > > What am I missing? > Steve > > > > > > > -- > -- > 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/2c42e59a-5700-45d5-a0f4-c1894c3c4a05n%40googlegroups.com > <https://groups.google.com/d/msgid/v8-users/2c42e59a-5700-45d5-a0f4-c1894c3c4a05n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- -- 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/CAN-e9e81z9b50Am3%3DroqHGRbdvf9cn6t9v_UW7sNJvw_L%2Bh6Lg%40mail.gmail.com.