Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't close handle scope in GC epilogue callback #50

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bnoordhuis
Copy link

Don't call v8::HandleScope::Close() from the 'after GC' callback, there
is no parent handle scope to move the value to. Fixes the following
error in node.js debug builds:

FATAL ERROR: v8::HandleScope::CreateHandle() Cannot create a handle
without a HandleScope

Before this commit, include.js was hard-coded to load the release
build of the add-on.  Now it falls back to the debug build when the
release build is unavailable.

Makes life easier for people who build with `node-gyp --debug rebuild`
or have npm_config_debug set in the environment.
Don't call v8::HandleScope::Close() from the 'after GC' callback, there
is no parent handle scope to move the value to.  Fixes the following
error in node.js debug builds:

    FATAL ERROR: v8::HandleScope::CreateHandle() Cannot create a handle
    without a HandleScope
@bnoordhuis
Copy link
Author

Sorry, I should have made explicit that this bug can lead to random segmentation faults in release builds. I'll update the commit log if you want.

bnoordhuis added a commit to strongloop-forks/node-memwatch that referenced this pull request Jan 24, 2014
* change the package name and project URLs, we're effectively forking
  until lloyd#50 is resolved

* add myself to the list of contributors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant