src: add method to compute storage in WriteWrap
WriteWrap
instances may contain extra storage space.
self_size()
returns the size of the entire struct, member fields as
well as storage space, so it is not an accurate measure for the
storage space available.
Add a method ExtraSize()
(like the existing Extra()
for accessing
the storage memory) that yields the wanted value, and use it
in the HTTP2 impl to fix a crash.
Ref: https://github.com/nodejs/node/pull/16669
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included (they crashe without this) -
commit message follows commit guidelines
Affected core subsystem(s)
http2
@nodejs/http2 @jasnell Probably want to fast-track this :)