Skip to content
This repository has been archived by the owner on Aug 31, 2018. It is now read-only.

Commit

Permalink
src: fix http2 debug build errors
Browse files Browse the repository at this point in the history
Currently building with debug enabled produces the following errors:

In file included from ../src/node_http2.h:6:
../src/node_http2_core-inl.h:465:18: error: expected ';' after do/while
statement
  CHECK_GT(id, 0)
                 ^
                 ;
../src/node_http2_core-inl.h:469:18: error: use of undeclared identifier
'spec'
  OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
                 ^
../src/node_http2_core-inl.h:469:34: error: use of undeclared identifier
'spec'
  OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
                                 ^
../src/node_http2_core-inl.h:469:47: error: use of undeclared identifier
'spec'
  OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
                                              ^

This commit adds the missing semicolon to fix the above error.

../src/node_http2.cc:92:9: error: reference to non-static member
function must be called; did you mean to call
      it with no arguments?
  CHECK(object->Has(context, env()->ongetpadding_string()).FromJust());
        ^~~~~~
../src/util.h:120:20: note: expanded from macro 'CHECK'
    if (UNLIKELY(!(expr))) {
\
                   ^~~~
../src/util.h:107:44: note: expanded from macro 'UNLIKELY'

For this issue I was not sure what the correct check would be so I've
just commented it out and will update after feedback.

PR-URL: nodejs/node#16432
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
  • Loading branch information
danbev authored and addaleax committed Dec 7, 2017
1 parent 4fe9a07 commit e328111
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/node_http2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ ssize_t Http2Session::OnCallbackPadding(size_t frameLen,
Context::Scope context_scope(context);

#if defined(DEBUG) && DEBUG
CHECK(object->Has(context, env()->ongetpadding_string()).FromJust());
CHECK(object()->Has(context, env()->ongetpadding_string()).FromJust());
#endif

AliasedBuffer<uint32_t, v8::Uint32Array>& buffer =
Expand Down
2 changes: 1 addition & 1 deletion src/node_http2_core-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ inline void Nghttp2Session::HandlePriorityFrame(const nghttp2_frame* frame) {
// good here

#if defined(DEBUG) && DEBUG
CHECK_GT(id, 0)
CHECK_GT(id, 0);
#endif

nghttp2_priority_spec spec = priority_frame.pri_spec;
Expand Down

0 comments on commit e328111

Please sign in to comment.