Skip to content

Commit

Permalink
Applying temp workaround for CI in node 12 and 13
Browse files Browse the repository at this point in the history
  • Loading branch information
melchor629 committed Jan 26, 2020
1 parent 6372e18 commit f7cc5a9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/avoid-double-delete-ref-in-object-wrap.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- /media/hdd/dev/node-addon-api-master/napi-inl.h 2020-01-21 06:41:58.000000000 +0100
+++ node_modules/node-addon-api/napi-inl.h 2020-01-26 16:33:38.000000000 +0100
@@ -3121,8 +3121,10 @@
Object object = Value();
// It is not valid to call `napi_remove_wrap()` with an empty `object`.
// This happens e.g. during garbage collection.
- if (!object.IsEmpty())
+ if (!object.IsEmpty()) {
napi_remove_wrap(Env(), object, nullptr);
+ this->SuppressDestruct();
+ }
}
}

5 changes: 4 additions & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
strategy:
matrix:
node: [10] # Disabled node 12 until crash is fixed
node: [10, 12, 13]
runs-on: ubuntu-latest
container:
image: node:${{ matrix.node }}-buster
Expand All @@ -20,6 +20,9 @@ jobs:
apt-get install -y cmake libflac-dev flac
- name: Install
run: npm install
- name: Workarounds
run: /
patch node_modules/node-addon-api/napi-inl.h < .github/workflows/avoid-double-delete-ref-in-object-wrap.patch
- name: Build
run: npm run cmake-js -- build
- name: Lint
Expand Down

0 comments on commit f7cc5a9

Please sign in to comment.