In using the addonlayer, a handle (shim_ctx_t*) is returned and then passed around to be used in additional calls later.
To verify that all the proper values are being passed into our methods, we are doing JS validations on the parameters before calling back into the addon layer, however in Node 0.11.x the validations create a type error when they try to do isNaN(handle) or toString using handle + ''.
TypeError: Cannot convert object to primitive value
In using the addonlayer, a handle (shim_ctx_t*) is returned and then passed around to be used in additional calls later.
To verify that all the proper values are being passed into our methods, we are doing JS validations on the parameters before calling back into the addon layer, however in Node 0.11.x the validations create a type error when they try to do
isNaN(handle)
or toString usinghandle + ''
.I originally had logged this issue against Node, but Fedor Indutny believes the error occurs because of the change in the addon layer, here https://github.com/tjfontaine/node-addon-layer/blob/master/src/shim.cc#L1645
It looks like this change was made purposefully for Node 0.11, so what do you recommend?
I had added a failing test to demonstrate the problem at https://github.com/tjfontaine/node-addon-layer-test/pull/1