From d6cc49a1cac71a1c59b5abb48528e19f7ba4e126 Mon Sep 17 00:00:00 2001 From: Daniel Hritzkiv Date: Tue, 31 Dec 2019 01:22:20 -0500 Subject: [PATCH] Make gl context aware See https://github.com/nodejs/node/pull/29631 https://github.com/electron/electron/issues/18397 --- src/native/bindings.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/native/bindings.cc b/src/native/bindings.cc index 44a640a6..0e316f85 100644 --- a/src/native/bindings.cc +++ b/src/native/bindings.cc @@ -488,4 +488,8 @@ NAN_MODULE_INIT(Init) { Nan::Export(target, "setError", WebGLRenderingContext::SetError); } +#if NODE_MAJOR_VERSION >= 10 +NAN_MODULE_WORKER_ENABLED(webgl, Init) +#else NODE_MODULE(webgl, Init) +#endif