string_decoder: fix crash when calling `__proto__.write()` using C++
requested to merge github/fork/RaisinTen/string_decoder/fix-crash-when-calling-__proto__.write-c++ into master
This makes the function throw an exception from C++ instead of crashing.
Fixes: https://github.com/nodejs/node/issues/41949 Signed-off-by: Darshan Sen raisinten@gmail.com