Fix issues with v8 contexts in vm module #3039

wants to merge 2 commits into
Commits on Mar 30, 2012
  1. @laverdet

    Revert "Revert "Re-add top-level v8::Locker""

    laverdet committed Mar 30, 2012
    Locker does *NOT* cause a crash. The error is in Node, Locker simply
    makes this existing errors louder, and only in debug mode. Fix for the
    specific issue coming in after this.
    This reverts commit 4071815.
  2. @laverdet

    Fix issue with unexited contexts in vm module

    laverdet committed Mar 30, 2012
    This EvalMachine function is an RIAA nightmare and doesn't enter and
    exit contexts correctly. I used an auto_ptr with a Context::Scope to
    handle the dynamic nature of EvalMachine's behavior and created a class
    which will dispose a persitent handle at the end of scope. This ensures
    100% that the context is exited if needed, and disposed if needed.