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

vm: remove unnecessary HandleScopes #2001

Merged
merged 1 commit into from
Jun 17, 2015

Conversation

bnoordhuis
Copy link
Member

The accessors run inside an implicit HandleScope, there is no need to
create a new one.

R=@trevnorris?

CI: https://jenkins-iojs.nodesource.com/view/iojs/job/iojs+any-pr+multi/37/

@mscdex mscdex added the vm Issues and PRs related to the vm subsystem. label Jun 17, 2015
The accessors run inside an implicit HandleScope, there is no need to
create a new one.

PR-URL: nodejs#2001
Reviewed-By: Trevor Norris <[email protected]>
@trevnorris
Copy link
Contributor

LGTM

@bnoordhuis bnoordhuis force-pushed the remove-handlescopes branch from 0e6410f to 5d0cee4 Compare June 17, 2015 18:06
@bnoordhuis bnoordhuis closed this Jun 17, 2015
@bnoordhuis bnoordhuis deleted the remove-handlescopes branch June 17, 2015 18:06
@bnoordhuis bnoordhuis merged commit 5d0cee4 into nodejs:master Jun 17, 2015
@domenic
Copy link
Contributor

domenic commented Jun 17, 2015

For my future learnings, how do you know this?

@rvagg
Copy link
Member

rvagg commented Jun 17, 2015

my understanding is that methods that are called by V8 from JS code have an implicit HandleScope, that's standard methods as well as property getters and whatnot.

@bnoordhuis
Copy link
Member Author

@domenic It's part of the generated code: https://github.com/nodejs/io.js/blob/v2.3.0/deps/v8/src/x64/code-stubs-x64.cc#L4751-4761 (CallApiFunctionAndReturn is used for both normal API callbacks and accessors.)

@domenic
Copy link
Contributor

domenic commented Jun 17, 2015

Awesome, thanks!

@rvagg rvagg mentioned this pull request Jun 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vm Issues and PRs related to the vm subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants