Comment #8 on issue 3791 by [email protected]: Weak callback not called for all objects returned from generators.
https://code.google.com/p/v8/issues/detail?id=3791

I re-applied my change to samples/shell.cc and hope that will simplify the test case somewhat:

$ out/x64.debug/shell --harmony-iteration --harmony-generators --trace-gc
V8 version 3.24.35.33 [sample shell]
var d = wrap(new Date());
Shell::Wrap adding 0x1163400

WeakCallback clearing 0x1163400
[30317] 10721 ms: Mark-sweep 1.0 (37.2) -> 1.0 (37.2) MB, 31.7 ms [idle notification: contexts disposed] [GC in old space requested].

The above demonstrates that global variable d gets cleared when shell exits.

$ out/x64.debug/shell --harmony-iteration --harmony-generators --trace-gc
V8 version 3.24.35.33 [sample shell]
function* gen(lim) { for (var i = 0; i < lim; i++) yield wrap(new Date())};
var i = 0;
for (var t of gen(2)) {i++;}
Shell::Wrap adding 0x1773400
Shell::Wrap adding 0x177f110
1

WeakCallback clearing 0x1773400
[30331] 32979 ms: Mark-sweep 1.0 (37.2) -> 1.0 (37.2) MB, 29.8 ms [idle notification: contexts disposed] [GC in old space requested].

The above demonstrates that global variable t doesn't get cleared using the same shell.

The diff to samples/shell.cc is attached.


Attachments:
        shell-3.24.patch.txt  1.7 KB

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to