nodejs/node-addon-api

Symbol::WellKnown fails in Object::CheckCast when NODE_ADDON_API_ENABLE_TYPE_CHECK_ON_AS is defined

swwilson-bsi opened this issue · 1 comments

Define NODE_ADDON_API_ENABLE_TYPE_CHECK_ON_AS
Do not define NODE_ADDON_API_ENABLE_MAYBE
Symbol::WellKnown calls Napi::Env(env).Global().Get("Symbol").As().
That will trigger a fatal error because napi_typeof(Symbol) returns napi_function, not napi_object.

@legendecas mentioned in the meeting today that we should add testing with the most strick options and that he'll take a look at that.