| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0c4353a commit b5fe27c
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -46,24 +46,6 @@ setupTraceCategoryState(); | |||
| 46 | 46 | ||
| 47 | 47 | setupProcessObject(); | |
| 48 | 48 | ||
| 49 | - // TODO(joyeecheung): this does not have to done so early, any fatal errors | ||
| 50 | - // thrown before user code execution should simply crash the process | ||
| 51 | - // and we do not care about any clean up at that point. We don't care | ||
| 52 | - // about emitting any events if the process crash upon bootstrap either. | ||
| 53 | - { | ||
| 54 | - const { | ||
| 55 | - fatalException, | ||
| 56 | - setUncaughtExceptionCaptureCallback, | ||
| 57 | - hasUncaughtExceptionCaptureCallback | ||
| 58 | - } = NativeModule.require('internal/process/execution'); | ||
| 59 | - | ||
| 60 | - process._fatalException = fatalException; | ||
| 61 | - process.setUncaughtExceptionCaptureCallback = | ||
| 62 | - setUncaughtExceptionCaptureCallback; | ||
| 63 | - process.hasUncaughtExceptionCaptureCallback = | ||
| 64 | - hasUncaughtExceptionCaptureCallback; | ||
| 65 | - } | ||
| 66 | - | ||
| 67 | 49 | setupGlobalProxy(); | |
| 68 | 50 | setupBuffer(); | |
| 69 | 51 | ||
@@ -303,6 +285,20 @@ Object.defineProperty(process, 'features', { | |||
| 303 | 285 | } | |
| 304 | 286 | }); | |
| 305 | 287 | ||
| 288 | + { | ||
| 289 | + const { | ||
| 290 | + fatalException, | ||
| 291 | + setUncaughtExceptionCaptureCallback, | ||
| 292 | + hasUncaughtExceptionCaptureCallback | ||
| 293 | + } = NativeModule.require('internal/process/execution'); | ||
| 294 | + | ||
| 295 | + process._fatalException = fatalException; | ||
| 296 | + process.setUncaughtExceptionCaptureCallback = | ||
| 297 | + setUncaughtExceptionCaptureCallback; | ||
| 298 | + process.hasUncaughtExceptionCaptureCallback = | ||
| 299 | + hasUncaughtExceptionCaptureCallback; | ||
| 300 | + } | ||
| 301 | + | ||
| 306 | 302 | // User-facing NODE_V8_COVERAGE environment variable that writes | |
| 307 | 303 | // ScriptCoverage to a specified file. | |
| 308 | 304 | if (process.env.NODE_V8_COVERAGE) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments