Skip to content

Commit

Permalink
Use NAN_MODULE_WORKER_ENABLED to make module context aware
Browse files Browse the repository at this point in the history
All native modules used Electron be context-ware before when upgrading to Electron 14. [ref](electron/electron#18397). `superstring` is still one of the module that isn't context-aware.

This commit uses NAN_MODULE_WORKER_ENABLED instead of `NODE_MODULE` to make the module context-aware.

Please check electron/electron#18397 and nodejs/nan#792 for more detail.
  • Loading branch information
Bong Nguyen committed Nov 10, 2022
1 parent eb0cc09 commit 6964467
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,5 +1,6 @@
node_modules
build
bin
.DS_Store
.clang_complete

Expand Down
2 changes: 1 addition & 1 deletion src/bindings/bindings.cc
Expand Up @@ -21,4 +21,4 @@ void Init(Local<Object> exports) {
TextBufferSnapshotWrapper::init();
}

NODE_MODULE(superstring, Init)
NAN_MODULE_WORKER_ENABLED(superstring, Init)

0 comments on commit 6964467

Please sign in to comment.