Skip to content

Commit

Permalink
doc: clean up weird notes about reentrancy
Browse files Browse the repository at this point in the history
All N-API methods are reentrant, it does not make sense to talk
about specific ones here.

Some of these methods can run JS code, which of course can run
other N-API code. For those methods, let’s note that down explicitly.

PR-URL: #40107
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
  • Loading branch information
addaleax authored and BethGriggs committed Sep 21, 2021
1 parent 8b80dcb commit 2488bc0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3303,7 +3303,6 @@ Returns `napi_ok` if the API succeeded.

This API implements the abstract operation `ToBoolean()` as defined in
[Section 7.1.2][] of the ECMAScript Language Specification.
This API can be re-entrant if getters are defined on the passed-in `Object`.

### napi_coerce_to_number
<!-- YAML
Expand All @@ -3325,7 +3324,8 @@ Returns `napi_ok` if the API succeeded.

This API implements the abstract operation `ToNumber()` as defined in
[Section 7.1.3][] of the ECMAScript Language Specification.
This API can be re-entrant if getters are defined on the passed-in `Object`.
This function potentially runs JS code if the passed-in value is an
object.

### napi_coerce_to_object
<!-- YAML
Expand All @@ -3347,7 +3347,6 @@ Returns `napi_ok` if the API succeeded.

This API implements the abstract operation `ToObject()` as defined in
[Section 7.1.13][] of the ECMAScript Language Specification.
This API can be re-entrant if getters are defined on the passed-in `Object`.

### napi_coerce_to_string
<!-- YAML
Expand All @@ -3369,7 +3368,8 @@ Returns `napi_ok` if the API succeeded.

This API implements the abstract operation `ToString()` as defined in
[Section 7.1.13][] of the ECMAScript Language Specification.
This API can be re-entrant if getters are defined on the passed-in `Object`.
This function potentially runs JS code if the passed-in value is an
object.

### napi_typeof
<!-- YAML
Expand Down

0 comments on commit 2488bc0

Please sign in to comment.