Closed minggangw closed 1 year ago
Since Electron 21, the V8 sandboxed pointers was enabled, which disables creating a new BackingStore and taking over an external memory block. Instead, we must copy the data into a newly-allocated memory that is inside V8 memory cage.
See more details: https://www.electronjs.org/blog/v8-memory-cage
This patch fixed the crashing when running on Electron > 21.
Testing
Electron v25.0.1 with Iron
electron --expose-gc ./scripts/run_test.js
electron example/subscription-message-example.js
node example/publisher-message-example.js
npm test
Fix #864
Since Electron 21, the V8 sandboxed pointers was enabled, which disables creating a new BackingStore and taking over an external memory block. Instead, we must copy the data into a newly-allocated memory that is inside V8 memory cage.
See more details: https://www.electronjs.org/blog/v8-memory-cage
This patch fixed the crashing when running on Electron > 21.
Testing
Electron v25.0.1 with Iron
electron --expose-gc ./scripts/run_test.js
electron example/subscription-message-example.js
&node example/publisher-message-example.js
npm test
Fix #864