mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
PR-URL: https://github.com/nodejs/node/pull/28426 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
48 lines
1.3 KiB
C++
48 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include "node.h"
|
|
#include "node_buffer.h"
|
|
#include "uv.h"
|
|
#include "util.h"
|
|
|
|
#ifndef _WIN32
|
|
#include <sys/types.h>
|
|
#include <unistd.h>
|
|
#endif
|
|
|
|
#include <iomanip>
|
|
|
|
namespace report {
|
|
|
|
// Function declarations - functions in src/node_report.cc
|
|
std::string TriggerNodeReport(v8::Isolate* isolate,
|
|
node::Environment* env,
|
|
const char* message,
|
|
const char* trigger,
|
|
const std::string& name,
|
|
v8::Local<v8::Object> error);
|
|
void GetNodeReport(v8::Isolate* isolate,
|
|
node::Environment* env,
|
|
const char* message,
|
|
const char* trigger,
|
|
v8::Local<v8::Object> error,
|
|
std::ostream& out);
|
|
|
|
// Function declarations - utility functions in src/node_report_utils.cc
|
|
void WalkHandle(uv_handle_t* h, void* arg);
|
|
|
|
template <typename T>
|
|
std::string ValueToHexString(T value) {
|
|
std::stringstream hex;
|
|
|
|
hex << "0x" << std::setfill('0') << std::setw(sizeof(T) * 2) << std::hex <<
|
|
value;
|
|
return hex.str();
|
|
}
|
|
|
|
// Function declarations - export functions in src/node_report_module.cc
|
|
void WriteReport(const v8::FunctionCallbackInfo<v8::Value>& info);
|
|
void GetReport(const v8::FunctionCallbackInfo<v8::Value>& info);
|
|
|
|
} // namespace report
|