contextify: fix ContextifyContext leak
authorFedor Indutny <fedor.indutny@gmail.com>
Sat, 14 Sep 2013 14:29:24 +0000 (18:29 +0400)
committerFedor Indutny <fedor.indutny@gmail.com>
Sat, 14 Sep 2013 20:56:11 +0000 (00:56 +0400)
commit59a075e108c7ffcee87252255e60530cd15a8adb
tree9a6c9fc5387f3ba142f065d6cc81227bc62f9a11
parentf31037ddfefdc8fab94980cd16a525827ba19abf
contextify: fix ContextifyContext leak

Apparently, context->Global() won't be destroyed if the context itself
isn't marked as weak and independent.

Also, the weakness flag should be cleared once the weak callback is
executed, otherwise we'll get crashes in Debug builds.

fix #6115 and #6201
src/node_contextify.cc
test/pummel/test-vm-memleak.js