| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3093617 commit 2908e63
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,7 +23,7 @@ is provided below for reference. | |||
| 23 | 23 | { | |
| 24 | 24 | "header": { | |
| 25 | 25 | "event": "exception", | |
| 26 | - "location": "OnUncaughtException", | ||
| 26 | + "trigger": "Exception", | ||
| 27 | 27 | "filename": "report.20181221.005011.8974.001.json", | |
| 28 | 28 | "dumpEventTime": "2018-12-21T00:50:11Z", | |
| 29 | 29 | "dumpEventTimeStamp": "1545371411331", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -318,7 +318,7 @@ void OnFatalError(const char* location, const char* message) { | |||
| 318 | 318 | Environment* env = Environment::GetCurrent(isolate); | |
| 319 | 319 | if (env == nullptr || env->isolate_data()->options()->report_on_fatalerror) { | |
| 320 | 320 | report::TriggerNodeReport( | |
| 321 | - isolate, env, message, __func__, "", Local<String>()); | ||
| 321 | + isolate, env, message, "FatalError", "", Local<String>()); | ||
| 322 | 322 | } | |
| 323 | 323 | #endif // NODE_REPORT | |
| 324 | 324 | fflush(stderr); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -70,7 +70,7 @@ using v8::Value; | |||
| 70 | 70 | static void WriteNodeReport(Isolate* isolate, | |
| 71 | 71 | Environment* env, | |
| 72 | 72 | const char* message, | |
| 73 | - const char* location, | ||
| 73 | + const char* trigger, | ||
| 74 | 74 | const std::string& filename, | |
| 75 | 75 | std::ostream& out, | |
| 76 | 76 | Local<String> stackstr, | |
@@ -79,7 +79,7 @@ static void PrintVersionInformation(JSONWriter* writer); | |||
| 79 | 79 | static void PrintJavaScriptStack(JSONWriter* writer, | |
| 80 | 80 | Isolate* isolate, | |
| 81 | 81 | Local<String> stackstr, | |
| 82 | - const char* location); | ||
| 82 | + const char* trigger); | ||
| 83 | 83 | static void PrintNativeStack(JSONWriter* writer); | |
| 84 | 84 | #ifndef _WIN32 | |
| 85 | 85 | static void PrintResourceUsage(JSONWriter* writer); | |
@@ -100,7 +100,7 @@ static std::atomic_int seq = {0}; // sequence number for report filenames | |||
| 100 | 100 | std::string TriggerNodeReport(Isolate* isolate, | |
| 101 | 101 | Environment* env, | |
| 102 | 102 | const char* message, | |
| 103 | - const char* location, | ||
| 103 | + const char* trigger, | ||
| 104 | 104 | std::string name, | |
| 105 | 105 | Local<String> stackstr) { | |
| 106 | 106 | std::ostringstream oss; | |
@@ -178,7 +178,7 @@ std::string TriggerNodeReport(Isolate* isolate, | |||
| 178 | 178 | << "Writing Node.js report to file: " << filename << std::endl; | |
| 179 | 179 | } | |
| 180 | 180 | ||
| 181 | - WriteNodeReport(isolate, env, message, location, filename, *outstream, | ||
| 181 | + WriteNodeReport(isolate, env, message, trigger, filename, *outstream, | ||
| 182 | 182 | stackstr, &tm_struct); | |
| 183 | 183 | ||
| 184 | 184 | // Do not close stdout/stderr, only close files we opened. | |
@@ -194,22 +194,22 @@ std::string TriggerNodeReport(Isolate* isolate, | |||
| 194 | 194 | void GetNodeReport(Isolate* isolate, | |
| 195 | 195 | Environment* env, | |
| 196 | 196 | const char* message, | |
| 197 | - const char* location, | ||
| 197 | + const char* trigger, | ||
| 198 | 198 | Local<String> stackstr, | |
| 199 | 199 | std::ostream& out) { | |
| 200 | 200 | // Obtain the current time and the pid (platform dependent) | |
| 201 | 201 | TIME_TYPE tm_struct; | |
| 202 | 202 | LocalTime(&tm_struct); | |
| 203 | 203 | WriteNodeReport( | |
| 204 | - isolate, env, message, location, "", out, stackstr, &tm_struct); | ||
| 204 | + isolate, env, message, trigger, "", out, stackstr, &tm_struct); | ||
| 205 | 205 | } | |
| 206 | 206 | ||
| 207 | 207 | // Internal function to coordinate and write the various | |
| 208 | 208 | // sections of the report to the supplied stream | |
| 209 | 209 | static void WriteNodeReport(Isolate* isolate, | |
| 210 | 210 | Environment* env, | |
| 211 | 211 | const char* message, | |
| 212 | - const char* location, | ||
| 212 | + const char* trigger, | ||
| 213 | 213 | const std::string& filename, | |
| 214 | 214 | std::ostream& out, | |
| 215 | 215 | Local<String> stackstr, | |
@@ -228,7 +228,7 @@ static void WriteNodeReport(Isolate* isolate, | |||
| 228 | 228 | writer.json_objectstart("header"); | |
| 229 | 229 | ||
| 230 | 230 | writer.json_keyvalue("event", message); | |
| 231 | - writer.json_keyvalue("location", location); | ||
| 231 | + writer.json_keyvalue("trigger", trigger); | ||
| 232 | 232 | if (!filename.empty()) | |
| 233 | 233 | writer.json_keyvalue("filename", filename); | |
| 234 | 234 | else | |
@@ -280,7 +280,7 @@ static void WriteNodeReport(Isolate* isolate, | |||
| 280 | 280 | writer.json_objectend(); | |
| 281 | 281 | ||
| 282 | 282 | // Report summary JavaScript stack backtrace | |
| 283 | - PrintJavaScriptStack(&writer, isolate, stackstr, location); | ||
| 283 | + PrintJavaScriptStack(&writer, isolate, stackstr, trigger); | ||
| 284 | 284 | ||
| 285 | 285 | // Report native stack backtrace | |
| 286 | 286 | PrintNativeStack(&writer); | |
@@ -372,12 +372,12 @@ static void PrintVersionInformation(JSONWriter* writer) { | |||
| 372 | 372 | static void PrintJavaScriptStack(JSONWriter* writer, | |
| 373 | 373 | Isolate* isolate, | |
| 374 | 374 | Local<String> stackstr, | |
| 375 | - const char* location) { | ||
| 375 | + const char* trigger) { | ||
| 376 | 376 | writer->json_objectstart("javascriptStack"); | |
| 377 | 377 | ||
| 378 | 378 | std::string ss; | |
| 379 | - if ((!strcmp(location, "OnFatalError")) || | ||
| 380 | - (!strcmp(location, "Signal"))) { | ||
| 379 | + if ((!strcmp(trigger, "FatalError")) || | ||
| 380 | + (!strcmp(trigger, "Signal"))) { | ||
| 381 | 381 | ss = "No stack.\nUnavailable.\n"; | |
| 382 | 382 | } else { | |
| 383 | 383 | String::Utf8Value sv(isolate, stackstr); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -43,13 +43,13 @@ typedef struct tm TIME_TYPE; | |||
| 43 | 43 | std::string TriggerNodeReport(v8::Isolate* isolate, | |
| 44 | 44 | node::Environment* env, | |
| 45 | 45 | const char* message, | |
| 46 | - const char* location, | ||
| 46 | + const char* trigger, | ||
| 47 | 47 | std::string name, | |
| 48 | 48 | v8::Local<v8::String> stackstr); | |
| 49 | 49 | void GetNodeReport(v8::Isolate* isolate, | |
| 50 | 50 | node::Environment* env, | |
| 51 | 51 | const char* message, | |
| 52 | - const char* location, | ||
| 52 | + const char* trigger, | ||
| 53 | 53 | v8::Local<v8::String> stackstr, | |
| 54 | 54 | std::ostream& out); | |
| 55 | 55 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -58,15 +58,15 @@ function _validateContent(data) { | |||
| 58 | 58 | ||
| 59 | 59 | // Verify the format of the header section. | |
| 60 | 60 | const header = report.header; | |
| 61 | - const headerFields = ['event', 'location', 'filename', 'dumpEventTime', | ||
| 61 | + const headerFields = ['event', 'trigger', 'filename', 'dumpEventTime', | ||
| 62 | 62 | 'dumpEventTimeStamp', 'processId', 'commandLine', | |
| 63 | 63 | 'nodejsVersion', 'wordSize', 'arch', 'platform', | |
| 64 | 64 | 'componentVersions', 'release', 'osName', 'osRelease', | |
| 65 | 65 | 'osVersion', 'osMachine', 'host', 'glibcVersionRuntime', | |
| 66 | 66 | 'glibcVersionCompiler']; | |
| 67 | 67 | checkForUnknownFields(header, headerFields); | |
| 68 | 68 | assert.strictEqual(typeof header.event, 'string'); | |
| 69 | - assert.strictEqual(typeof header.location, 'string'); | ||
| 69 | + assert.strictEqual(typeof header.trigger, 'string'); | ||
| 70 | 70 | assert(typeof header.filename === 'string' || header.filename === null); | |
| 71 | 71 | assert.notStrictEqual(new Date(header.dumpEventTime).toString(), | |
| 72 | 72 | 'Invalid Date'); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments