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

fix: add an napi handle scope for the callback #22

Merged
merged 2 commits into from
Jul 31, 2020

Conversation

MarshallOfSound
Copy link
Contributor

Required for Electron 10 where the memory-leak-handle-scope was removed

cc @deepak1556

@ghost
Copy link

ghost commented Jul 28, 2020

CLA assistant check
All CLA requirements met.

@deepak1556 deepak1556 requested a review from alexdima July 28, 2020 21:08
@deepak1556
Copy link
Contributor

@alexdima for context, what @MarshallOfSound is referring to is electron/electron#22531 where electron previously had a global handle scope installed which allowed for memory leaks.

Copy link
Member

@alexdima alexdima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thank you!

@alexdima alexdima merged commit 4241203 into microsoft:master Jul 31, 2020
@alexdima
Copy link
Member

published native-keymap@2.1.3

I noticed that this generates a warning:

> node-gyp rebuild

  CXX(target) Release/obj.target/keymapping/src/string_conversion.o
  CXX(target) Release/obj.target/keymapping/src/keymapping.o
  CXX(target) Release/obj.target/keymapping/src/keyboard_mac.o
../src/keyboard_mac.mm:184:21: warning: unused variable 'scope' [-Wunused-variable]
  napi_handle_scope scope;
                    ^
1 warning generated.

That is OK for me if it avoids a crash, but it would be nice if we could avoid the warning :).

@MarshallOfSound MarshallOfSound deleted the patch-1 branch August 3, 2020 23:24
@MarshallOfSound
Copy link
Contributor Author

@alexdima Fixed that warning and actually made this fix work (whoops) over here --> #23

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.

3 participants