You're right, there is a problem here but I think we can fix it.
Right now marking happens in several phases:

  - mark everything reachable from roots
  - remember which standard weak handles hold unmarked objects
  - mark those objects as well
  - finish gc
  - execute weak callbacks

If we extend this with another phase it should solve the problem:

  - mark everything reachable from roots
  - remember which standard weak handles hold unmarked objects
  - mark those objects
  - remember which really weak handles hold unmarked objects
  - finish gc
  - execute weak and really-weak callbacks

This way we conservatively assume that any object held transitively by
standard weak handle is unsafe to collect eagerly through a really
weak handle.


-- Christian

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to