ddopson / node-segfault-handler

Tool for debugging native Node.js modules and getting stack traces when things go wrong.
BSD 3-Clause "New" or "Revised" License
319 stars 74 forks source link

Electron 7.x.x and > throws context aware warning #68

Open tehnorm opened 4 years ago

tehnorm commented 4 years ago

When loading the segfault handler in Electron 7.x.x and greater there is a warning in the output:

(node:39360) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information

Is this something that is tricky to have implemented? It doesn't look critical in the stable version of Electron but will stop working in the future. We really appreciate the utility of segfault-handler and the work that has gone into it.

No one on our team really understands what it would take to create a PR - we would be very happy to help test.

kneth commented 4 years ago

The issue mentioned says that N-API or Context Awareness is required in the future. Currently we use NaN, so it will require a rewrite to use N-API. Luckily, the code base isn't so large.