On Thu, Jan 7, 2016 at 3:49 PM, Hugh Fitzpatrick
<hugh.fitzpatr...@gmail.com> wrote:
> For instance - I cannot access  console.log(..)  or use require.
>
>  ... Any thoughts on getting these to work ?   Can I combine *many* JS files
> in a snapshot ?

You can't use node.js specific code in snapshot creation.

I'm not sure about deserialization; certainly not at deserialization
time itself because any node.js specific logic won't have been
installed yet.

Functions exported by the snapshot in theory should be able to call
`console.log` (`console` is a global object that can be lazily
resolved) but IIRC, there are some restrictions on scope lookup in
serialized code that may prohibit that.

require() won't work, it's not a global and snapshot code doesn't run
in module context.

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to