Skip to content

Commit

Permalink
src: fix formatting of context address within JSFunction
Browse files Browse the repository at this point in the history
PR-URL: #266
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
  • Loading branch information
mmarchini committed Feb 8, 2019
1 parent a36611f commit 51bf1f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/printer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ std::string Printer::Stringify(v8::JSFunction js_function, Error& err) {
std::stringstream ss;
ss << rang::fg::magenta << res << rang::fg::reset << rang::style::bold
<< rang::fg::yellow << "\n context" << rang::fg::reset
<< rang::style::reset << "=" << rang::fg::cyan << "0x%016" PRIx64
<< rang::fg::reset;
<< rang::style::reset << "=" << rang::fg::cyan << "0x" << std::hex
<< context_obj.raw() << std::dec << rang::fg::reset;
res = ss.str();

{
Expand Down
4 changes: 4 additions & 0 deletions test/plugin/inspect-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,10 @@ const hashMapTests = {
};

const contextTests = {
'context': {
re: /context=(0x[0-9a-f]+)[^\n]+/,
desc: ''
},
'previous': {
re: /\(previous\)=(0x[0-9a-f]+)[^\n]+/,
desc: '.(previous)'
Expand Down

0 comments on commit 51bf1f6

Please sign in to comment.