Commit 5c8cd0e
n-api: make changes for source compatibility
These changes are necessary in order to retain source compatibility
with older versions of node.
The removal of `module_version` from `napi_module_register()` is
reverted from the flag removal PR, because it should not have been a
part of it.
`CallbackWrapper::NewTarget()` is renamed to
`CallbackWrapper::GetNewTarget()` to distinguish it from V8's native
method, thus allowing for a macro which reduces `NewTarget()` to
`This()` on V8 versions where it was not yet available.
`AsyncResource` is constructed with a C string rather than a V8 string
because the former is available on all versions of node.
PR-URL: #16102
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jason Ginchereau <[email protected]>1 parent 1a884cd commit 5c8cd0e
1 file changed
+10
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
458 | | - | |
| 458 | + | |
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
487 | | - | |
| 487 | + | |
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
535 | | - | |
| 535 | + | |
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
| |||
854 | 854 | | |
855 | 855 | | |
856 | 856 | | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
857 | 861 | | |
858 | | - | |
| 862 | + | |
859 | 863 | | |
860 | 864 | | |
861 | 865 | | |
| |||
1908 | 1912 | | |
1909 | 1913 | | |
1910 | 1914 | | |
1911 | | - | |
| 1915 | + | |
1912 | 1916 | | |
1913 | 1917 | | |
1914 | 1918 | | |
| |||
3335 | 3339 | | |
3336 | 3340 | | |
3337 | 3341 | | |
3338 | | - | |
| 3342 | + | |
3339 | 3343 | | |
3340 | 3344 | | |
3341 | 3345 | | |
| |||
0 commit comments