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

Make sure V8 handles are deleted on UI thread #3676

Merged
merged 7 commits into from
Dec 3, 2015
Merged

Conversation

zcbenz
Copy link
Member

@zcbenz zcbenz commented Dec 3, 2015

This PR fixes a problem that some V8 handles are deleted on IO thread when a V8 function is used as protocol handlers, close #3419.

There also some more improvements on the management of JavaScript objects' lifetime to make the fix possible, currently a native JavaScript object could be deleted in following ways:

  • V8 garbage collected the object.
  • User calls the destroy method.
  • When JavaScript environment is destroyed, all objects get deleted by Electron.
  • When the holder of a V8 object gets deleted on IO thread, transfer the deletion to UI thread.

zcbenz added a commit that referenced this pull request Dec 3, 2015
Make sure V8 handles are deleted on UI thread
@zcbenz zcbenz merged commit f3645c6 into master Dec 3, 2015
@zcbenz zcbenz deleted the callback-race-condition branch December 3, 2015 10:06
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.

Hard crash just after opening Atom
1 participant