Skip to content

Commit 8c363cd

Browse files
bnoordhuisaddaleax
authored andcommitted
src: don't touch js object in Http2Session dtor
Don't try to update the internal field pointer of the JS object in the destructor. The garbage collector invokes the destructor when the object is collected and is not necessarily in a valid state anymore. PR-URL: nodejs#18656 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
1 parent 3de8e57 commit 8c363cd

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/node_http2.cc

-2
Original file line numberDiff line numberDiff line change
@@ -531,8 +531,6 @@ Http2Session::Http2Session(Environment* env,
531531

532532
Http2Session::~Http2Session() {
533533
CHECK_EQ(flags_ & SESSION_STATE_HAS_SCOPE, 0);
534-
if (!object().IsEmpty())
535-
ClearWrap(object());
536534
DEBUG_HTTP2SESSION(this, "freeing nghttp2 session");
537535
nghttp2_session_del(session_);
538536
}

0 commit comments

Comments
 (0)