Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
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: #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>
  • Loading branch information
bnoordhuis committed Feb 21, 2018
commit 6bdc18c592b9d66fd652a9bdaa53f87486d0a634
2 changes: 0 additions & 2 deletions src/node_http2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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_);
}
Expand Down