@@ -246,9 +246,9 @@ instances and asynchronous work scheduled by them.
246
246
247
247
Users are able to define their own ` type ` when using the public embedder API.
248
248
249
- * Note: * It is possible to have type name collisions. Embedders are encouraged
250
- to use unique prefixes, such as the npm package name, to prevent collisions
251
- when listening to the hooks.
249
+ It is possible to have type name collisions. Embedders are encouraged to use
250
+ unique prefixes, such as the npm package name, to prevent collisions when
251
+ listening to the hooks.
252
252
253
253
###### ` triggerId `
254
254
@@ -282,10 +282,10 @@ TCPWRAP(4): trigger: 2 execution: 0
282
282
The ` TCPSERVERWRAP ` is the server which receives the connections.
283
283
284
284
The ` TCPWRAP ` is the new connection from the client. When a new
285
- connection is made the ` TCPWrap ` instance is immediately constructed. This
286
- happens outside of any JavaScript stack (side note: a ` executionAsyncId() ` of
287
- ` 0 ` means it's being executed from C++, with no JavaScript stack above it).
288
- With only that information, it would be impossible to link resources together in
285
+ connection is made, the ` TCPWrap ` instance is immediately constructed. This
286
+ happens outside of any JavaScript stack. (An ` executionAsyncId() ` of ` 0 ` means
287
+ that it is being executed from C++ with no JavaScript stack above it). With only
288
+ that information, it would be impossible to link resources together in
289
289
terms of what caused them to be created, so ` triggerAsyncId ` is given the task
290
290
of propagating what resource is responsible for the new resource's existence.
291
291
@@ -420,9 +420,9 @@ it only once.
420
420
421
421
Called immediately after the callback specified in ` before ` is completed.
422
422
423
- * Note: * If an uncaught exception occurs during execution of the callback, then
424
- ` after ` will run * after* the ` 'uncaughtException' ` event is emitted or a
425
- ` domain ` 's handler runs.
423
+ If an uncaught exception occurs during execution of the callback, then ` after `
424
+ will run * after* the ` 'uncaughtException' ` event is emitted or a ` domain ` 's
425
+ handler runs.
426
426
427
427
428
428
##### ` destroy(asyncId) `
@@ -432,11 +432,10 @@ Called immediately after the callback specified in `before` is completed.
432
432
Called after the resource corresponding to ` asyncId ` is destroyed. It is also
433
433
called asynchronously from the embedder API ` emitDestroy() ` .
434
434
435
- * Note:* Some resources depend on garbage collection for cleanup, so if a
436
- reference is made to the ` resource ` object passed to ` init ` it is possible that
437
- ` destroy ` will never be called, causing a memory leak in the application. If
438
- the resource does not depend on garbage collection, then this will not be an
439
- issue.
435
+ Some resources depend on garbage collection for cleanup, so if a reference is
436
+ made to the ` resource ` object passed to ` init ` it is possible that ` destroy `
437
+ will never be called, causing a memory leak in the application. If the resource
438
+ does not depend on garbage collection, then this will not be an issue.
440
439
441
440
##### ` promiseResolve(asyncId) `
442
441
@@ -447,9 +446,8 @@ invoked (either directly or through other means of resolving a promise).
447
446
448
447
Note that ` resolve() ` does not do any observable synchronous work.
449
448
450
- * Note:* This does not necessarily mean that the ` Promise ` is fulfilled or
451
- rejected at this point, if the ` Promise ` was resolved by assuming the state
452
- of another ` Promise ` .
449
+ The ` Promise ` is not necessarily fulfilled or rejected at this point if the
450
+ ` Promise ` was resolved by assuming the state of another ` Promise ` .
453
451
454
452
``` js
455
453
new Promise ((resolve ) => resolve (true )).then ((a ) => {});
0 commit comments