On Thu, May 17, 2018 at 10:35 AM, Luo Wu <lwye...@pku.edu.cn> wrote:
> Hi Ben,
>
> Thanks for your reply. I am still confused about the difference between
> contexts. How does v8 restrict the JS code to access objects only in its
> context? Does it achieved by allocating objects in a given heap range, or
> associating each object with a Context property?

The latter, objects "know" what context they belong to.

More precisely, objects know what function constructed them (think
`obj.__proto__.constructor`) and functions have an explicit back-link
to their home 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