mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
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. Backport-PR-URL: https://github.com/nodejs/node/pull/19185 PR-URL: https://github.com/nodejs/node/pull/18656 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This commit is contained in:
1 parent
f89f659dcf
commit
420d56c2ea
1 file changed
-2
@@ -531,8 +531,6 @@ Http2Session::Http2Session(Environment* env,
|
||||
|
||||
Http2Session::~Http2Session() {
|
||||
CHECK_EQ(flags_ & SESSION_STATE_HAS_SCOPE, 0);
|
||||
if (!object().IsEmpty())
|
||||
ClearWrap(object());
|
||||
DEBUG_HTTP2SESSION(this, "freeing nghttp2 session");
|
||||
nghttp2_session_del(session_);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user