Blame SOURCES/pass-session-to-http2-debug.patch

a700bc
From f7d96acb6d990b4d68116214e3ab351def63b1d7 Mon Sep 17 00:00:00 2001
a700bc
From: Daniel Bevenius <daniel.bevenius@gmail.com>
a700bc
Date: Fri, 18 May 2018 09:58:37 +0200
a700bc
Subject: [PATCH] http2: pass session to DEBUG_HTTP2SESSION2
a700bc
a700bc
When configure with --debug-http2 --debug-nghttp2 the following
a700bc
compilation error is generated:
a700bc
a700bc
DEBUG_HTTP2SESSION2(this, "fatal error receiving data: %d", ret);
a700bc
                          ^
a700bc
../src/node_http2.cc:1690:27:
a700bc
error: invalid use of 'this' outside of a non-static member function
a700bc
a700bc
1 errors generated.
a700bc
a700bc
OnStreamReadImpl is static and I think the intention was to pass in the
a700bc
session variable here.
a700bc
a700bc
PR-URL: https://github.com/nodejs/node/pull/20815
a700bc
Refs: https://github.com/nodejs/node/issues/20806
a700bc
Reviewed-By: James M Snell <jasnell@gmail.com>
a700bc
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
a700bc
---
a700bc
 src/node_http2.cc | 2 +-
a700bc
 1 file changed, 1 insertion(+), 1 deletion(-)
a700bc
a700bc
diff --git a/src/node_http2.cc b/src/node_http2.cc
a700bc
index b3187858230..4aa9fceec18 100644
a700bc
--- a/src/node_http2.cc
a700bc
+++ b/src/node_http2.cc
a700bc
@@ -1687,7 +1687,7 @@ void Http2Session::OnStreamReadImpl(ssize_t nread,
a700bc
     // ssize_t to int. Cast here so that the < 0 check actually works on
a700bc
     // Windows.
a700bc
     if (static_cast<int>(ret) < 0) {
a700bc
-      DEBUG_HTTP2SESSION2(this, "fatal error receiving data: %d", ret);
a700bc
+      DEBUG_HTTP2SESSION2(session, "fatal error receiving data: %d", ret);
a700bc
 
a700bc
       Local<Value> argv[1] = {
a700bc
         Integer::New(isolate, ret),