Reason I placed it here is because the same technique will be useful in other locations as well (e.g. `WriteWrap` in `stream_wrap.h`). Should I just place it in each inherited class?