node-aix-ppc64 20.15.1 → 20.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +458 -0
- package/LICENSE +0 -33
- package/README.md +31 -23
- package/bin/node +0 -0
- package/include/node/common.gypi +5 -1
- package/include/node/config.gypi +2 -0
- package/include/node/js_native_api.h +26 -25
- package/include/node/js_native_api_types.h +13 -9
- package/include/node/node.exp +981 -907
- package/include/node/node.h +7 -3
- package/include/node/node_api.h +13 -13
- package/include/node/node_version.h +2 -2
- package/package.json +1 -1
- package/share/man/man1/node.1 +3 -8
package/LICENSE
CHANGED
|
@@ -1989,39 +1989,6 @@ The externally maintained libraries used by Node.js are:
|
|
|
1989
1989
|
THE POSSIBILITY OF SUCH DAMAGE.
|
|
1990
1990
|
"""
|
|
1991
1991
|
|
|
1992
|
-
- highlight.js, located at doc/api_assets/highlight.pack.js, is licensed as follows:
|
|
1993
|
-
"""
|
|
1994
|
-
BSD 3-Clause License
|
|
1995
|
-
|
|
1996
|
-
Copyright (c) 2006, Ivan Sagalaev.
|
|
1997
|
-
All rights reserved.
|
|
1998
|
-
|
|
1999
|
-
Redistribution and use in source and binary forms, with or without
|
|
2000
|
-
modification, are permitted provided that the following conditions are met:
|
|
2001
|
-
|
|
2002
|
-
* Redistributions of source code must retain the above copyright notice, this
|
|
2003
|
-
list of conditions and the following disclaimer.
|
|
2004
|
-
|
|
2005
|
-
* Redistributions in binary form must reproduce the above copyright notice,
|
|
2006
|
-
this list of conditions and the following disclaimer in the documentation
|
|
2007
|
-
and/or other materials provided with the distribution.
|
|
2008
|
-
|
|
2009
|
-
* Neither the name of the copyright holder nor the names of its
|
|
2010
|
-
contributors may be used to endorse or promote products derived from
|
|
2011
|
-
this software without specific prior written permission.
|
|
2012
|
-
|
|
2013
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
2014
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
2015
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
2016
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
2017
|
-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
2018
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
2019
|
-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
2020
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
2021
|
-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
2022
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
2023
|
-
"""
|
|
2024
|
-
|
|
2025
1992
|
- node-heapdump, located at src/heap_utils.cc, is licensed as follows:
|
|
2026
1993
|
"""
|
|
2027
1994
|
ISC License
|
package/README.md
CHANGED
|
@@ -164,14 +164,12 @@ For information about the governance of the Node.js project, see
|
|
|
164
164
|
|
|
165
165
|
* [aduh95](https://github.com/aduh95) -
|
|
166
166
|
**Antoine du Hamel** <<duhamelantoine1995@gmail.com>> (he/him)
|
|
167
|
-
* [
|
|
168
|
-
**
|
|
167
|
+
* [anonrig](https://github.com/anonrig) -
|
|
168
|
+
**Yagiz Nizipli** <<yagiz@nizipli.com>> (he/him)
|
|
169
169
|
* [benjamingr](https://github.com/benjamingr) -
|
|
170
170
|
**Benjamin Gruenbaum** <<benjamingr@gmail.com>>
|
|
171
171
|
* [BridgeAR](https://github.com/BridgeAR) -
|
|
172
172
|
**Ruben Bridgewater** <<ruben@bridgewater.de>> (he/him)
|
|
173
|
-
* [GeoffreyBooth](https://github.com/geoffreybooth) -
|
|
174
|
-
**Geoffrey Booth** <<webadmin@geoffreybooth.com>> (he/him)
|
|
175
173
|
* [gireeshpunathil](https://github.com/gireeshpunathil) -
|
|
176
174
|
**Gireesh Punathil** <<gpunathi@in.ibm.com>> (he/him)
|
|
177
175
|
* [jasnell](https://github.com/jasnell) -
|
|
@@ -180,6 +178,8 @@ For information about the governance of the Node.js project, see
|
|
|
180
178
|
**Joyee Cheung** <<joyeec9h3@gmail.com>> (she/her)
|
|
181
179
|
* [legendecas](https://github.com/legendecas) -
|
|
182
180
|
**Chengzhong Wu** <<legendecas@gmail.com>> (he/him)
|
|
181
|
+
* [marco-ippolito](https://github.com/marco-ippolito) -
|
|
182
|
+
**Marco Ippolito** <<marcoippolito54@gmail.com>> (he/him)
|
|
183
183
|
* [mcollina](https://github.com/mcollina) -
|
|
184
184
|
**Matteo Collina** <<matteo.collina@gmail.com>> (he/him)
|
|
185
185
|
* [mhdawson](https://github.com/mhdawson) -
|
|
@@ -203,8 +203,8 @@ For information about the governance of the Node.js project, see
|
|
|
203
203
|
|
|
204
204
|
#### TSC regular members
|
|
205
205
|
|
|
206
|
-
* [
|
|
207
|
-
**
|
|
206
|
+
* [apapirovski](https://github.com/apapirovski) -
|
|
207
|
+
**Anatoli Papirovski** <<apapirovski@mac.com>> (he/him)
|
|
208
208
|
* [BethGriggs](https://github.com/BethGriggs) -
|
|
209
209
|
**Beth Griggs** <<bethanyngriggs@gmail.com>> (she/her)
|
|
210
210
|
* [bnoordhuis](https://github.com/bnoordhuis) -
|
|
@@ -213,10 +213,8 @@ For information about the governance of the Node.js project, see
|
|
|
213
213
|
**Colin Ihrig** <<cjihrig@gmail.com>> (he/him)
|
|
214
214
|
* [codebytere](https://github.com/codebytere) -
|
|
215
215
|
**Shelley Vohr** <<shelley.vohr@gmail.com>> (she/her)
|
|
216
|
-
* [
|
|
217
|
-
**
|
|
218
|
-
* [MylesBorins](https://github.com/MylesBorins) -
|
|
219
|
-
**Myles Borins** <<myles.borins@gmail.com>> (he/him)
|
|
216
|
+
* [GeoffreyBooth](https://github.com/GeoffreyBooth) -
|
|
217
|
+
**Geoffrey Booth** <<webadmin@geoffreybooth.com>> (he/him)
|
|
220
218
|
* [Trott](https://github.com/Trott) -
|
|
221
219
|
**Rich Trott** <<rtrott@gmail.com>> (he/him)
|
|
222
220
|
|
|
@@ -234,6 +232,8 @@ For information about the governance of the Node.js project, see
|
|
|
234
232
|
**Chris Dickinson** <<christopher.s.dickinson@gmail.com>>
|
|
235
233
|
* [danbev](https://github.com/danbev) -
|
|
236
234
|
**Daniel Bevenius** <<daniel.bevenius@gmail.com>> (he/him)
|
|
235
|
+
* [danielleadams](https://github.com/danielleadams) -
|
|
236
|
+
**Danielle Adams** <<adamzdanielle@gmail.com>> (she/her)
|
|
237
237
|
* [evanlucas](https://github.com/evanlucas) -
|
|
238
238
|
**Evan Lucas** <<evanlucas@me.com>> (he/him)
|
|
239
239
|
* [fhinkel](https://github.com/fhinkel) -
|
|
@@ -254,6 +254,8 @@ For information about the governance of the Node.js project, see
|
|
|
254
254
|
**Mary Marchini** <<oss@mmarchini.me>> (she/her)
|
|
255
255
|
* [mscdex](https://github.com/mscdex) -
|
|
256
256
|
**Brian White** <<mscdex@mscdex.net>>
|
|
257
|
+
* [MylesBorins](https://github.com/MylesBorins) -
|
|
258
|
+
**Myles Borins** <<myles.borins@gmail.com>> (he/him)
|
|
257
259
|
* [nebrius](https://github.com/nebrius) -
|
|
258
260
|
**Bryan Hughes** <<bryan@nebri.us>>
|
|
259
261
|
* [ofrobots](https://github.com/ofrobots) -
|
|
@@ -290,7 +292,7 @@ For information about the governance of the Node.js project, see
|
|
|
290
292
|
* [aduh95](https://github.com/aduh95) -
|
|
291
293
|
**Antoine du Hamel** <<duhamelantoine1995@gmail.com>> (he/him)
|
|
292
294
|
* [anonrig](https://github.com/anonrig) -
|
|
293
|
-
**Yagiz Nizipli** <<yagiz
|
|
295
|
+
**Yagiz Nizipli** <<yagiz@nizipli.com>> (he/him)
|
|
294
296
|
* [apapirovski](https://github.com/apapirovski) -
|
|
295
297
|
**Anatoli Papirovski** <<apapirovski@mac.com>> (he/him)
|
|
296
298
|
* [atlowChemi](https://github.com/atlowChemi) -
|
|
@@ -327,7 +329,7 @@ For information about the governance of the Node.js project, see
|
|
|
327
329
|
**Deokjin Kim** <<deokjin81.kim@gmail.com>> (he/him)
|
|
328
330
|
* [edsadr](https://github.com/edsadr) -
|
|
329
331
|
**Adrian Estrada** <<edsadr@gmail.com>> (he/him)
|
|
330
|
-
* [
|
|
332
|
+
* [ErickWendel](https://github.com/ErickWendel) -
|
|
331
333
|
**Erick Wendel** <<erick.workspace@gmail.com>> (he/him)
|
|
332
334
|
* [Ethan-Arrowood](https://github.com/Ethan-Arrowood) -
|
|
333
335
|
**Ethan Arrowood** <<ethan@arrowood.dev>> (he/him)
|
|
@@ -341,7 +343,7 @@ For information about the governance of the Node.js project, see
|
|
|
341
343
|
**Gabriel Schulhof** <<gabrielschulhof@gmail.com>>
|
|
342
344
|
* [gengjiawen](https://github.com/gengjiawen) -
|
|
343
345
|
**Jiawen Geng** <<technicalcute@gmail.com>>
|
|
344
|
-
* [GeoffreyBooth](https://github.com/
|
|
346
|
+
* [GeoffreyBooth](https://github.com/GeoffreyBooth) -
|
|
345
347
|
**Geoffrey Booth** <<webadmin@geoffreybooth.com>> (he/him)
|
|
346
348
|
* [gireeshpunathil](https://github.com/gireeshpunathil) -
|
|
347
349
|
**Gireesh Punathil** <<gpunathi@in.ibm.com>> (he/him)
|
|
@@ -353,6 +355,8 @@ For information about the governance of the Node.js project, see
|
|
|
353
355
|
**Harshitha K P** <<harshitha014@gmail.com>> (she/her)
|
|
354
356
|
* [himself65](https://github.com/himself65) -
|
|
355
357
|
**Zeyu "Alex" Yang** <<himself65@outlook.com>> (he/him)
|
|
358
|
+
* [jakecastelli](https://github.com/jakecastelli) -
|
|
359
|
+
**Jake Yuesong Li** <<jake.yuesong@gmail.com>> (he/him)
|
|
356
360
|
* [JakobJingleheimer](https://github.com/JakobJingleheimer) -
|
|
357
361
|
**Jacob Smith** <<jacob@frende.me>> (he/him)
|
|
358
362
|
* [jasnell](https://github.com/jasnell) -
|
|
@@ -377,7 +381,7 @@ For information about the governance of the Node.js project, see
|
|
|
377
381
|
**Chengzhong Wu** <<legendecas@gmail.com>> (he/him)
|
|
378
382
|
* [lemire](https://github.com/lemire) -
|
|
379
383
|
**Daniel Lemire** <<daniel@lemire.me>>
|
|
380
|
-
* [
|
|
384
|
+
* [Linkgoron](https://github.com/Linkgoron) -
|
|
381
385
|
**Nitzan Uziely** <<linkgoron@gmail.com>>
|
|
382
386
|
* [LiviaMedeiros](https://github.com/LiviaMedeiros) -
|
|
383
387
|
**LiviaMedeiros** <<livia@cirno.name>>
|
|
@@ -391,12 +395,12 @@ For information about the governance of the Node.js project, see
|
|
|
391
395
|
**Marco Ippolito** <<marcoippolito54@gmail.com>> (he/him)
|
|
392
396
|
* [marsonya](https://github.com/marsonya) -
|
|
393
397
|
**Akhil Marsonya** <<akhil.marsonya27@gmail.com>> (he/him)
|
|
398
|
+
* [MattiasBuelens](https://github.com/MattiasBuelens) -
|
|
399
|
+
**Mattias Buelens** <<mattias@buelens.com>> (he/him)
|
|
394
400
|
* [mcollina](https://github.com/mcollina) -
|
|
395
401
|
**Matteo Collina** <<matteo.collina@gmail.com>> (he/him)
|
|
396
402
|
* [meixg](https://github.com/meixg) -
|
|
397
403
|
**Xuguang Mei** <<meixuguang@gmail.com>> (he/him)
|
|
398
|
-
* [Mesteery](https://github.com/Mesteery) -
|
|
399
|
-
**Mestery** <<mestery@protonmail.com>> (he/him)
|
|
400
404
|
* [mhdawson](https://github.com/mhdawson) -
|
|
401
405
|
**Michael Dawson** <<midawson@redhat.com>> (he/him)
|
|
402
406
|
* [mildsunrise](https://github.com/mildsunrise) -
|
|
@@ -405,8 +409,6 @@ For information about the governance of the Node.js project, see
|
|
|
405
409
|
**Moshe Atlow** <<moshe@atlow.co.il>> (he/him)
|
|
406
410
|
* [MrJithil](https://github.com/MrJithil) -
|
|
407
411
|
**Jithil P Ponnan** <<jithil@outlook.com>> (he/him)
|
|
408
|
-
* [MylesBorins](https://github.com/MylesBorins) -
|
|
409
|
-
**Myles Borins** <<myles.borins@gmail.com>> (he/him)
|
|
410
412
|
* [ovflowd](https://github.com/ovflowd) -
|
|
411
413
|
**Claudio Wunder** <<cwunder@gnome.org>> (he/they)
|
|
412
414
|
* [panva](https://github.com/panva) -
|
|
@@ -431,6 +433,8 @@ For information about the governance of the Node.js project, see
|
|
|
431
433
|
**Paolo Insogna** <<paolo@cowtech.it>> (he/him)
|
|
432
434
|
* [srl295](https://github.com/srl295) -
|
|
433
435
|
**Steven R Loomis** <<srl295@gmail.com>>
|
|
436
|
+
* [StefanStojanovic](https://github.com/StefanStojanovic) -
|
|
437
|
+
**Stefan Stojanovic** <<stefan.stojanovic@janeasystems.com>> (he/him)
|
|
434
438
|
* [sxa](https://github.com/sxa) -
|
|
435
439
|
**Stewart X Addison** <<sxa@redhat.com>> (he/him)
|
|
436
440
|
* [targos](https://github.com/targos) -
|
|
@@ -443,7 +447,7 @@ For information about the governance of the Node.js project, see
|
|
|
443
447
|
**Trivikram Kamat** <<trivikr.dev@gmail.com>>
|
|
444
448
|
* [Trott](https://github.com/Trott) -
|
|
445
449
|
**Rich Trott** <<rtrott@gmail.com>> (he/him)
|
|
446
|
-
* [UlisesGascon](https://github.com/
|
|
450
|
+
* [UlisesGascon](https://github.com/UlisesGascon) -
|
|
447
451
|
**Ulises Gascón** <<ulisesgascongonzalez@gmail.com>> (he/him)
|
|
448
452
|
* [vmoroz](https://github.com/vmoroz) -
|
|
449
453
|
**Vladimir Morozov** <<vmorozov@microsoft.com>> (he/him)
|
|
@@ -451,10 +455,6 @@ For information about the governance of the Node.js project, see
|
|
|
451
455
|
**Mohammed Keyvanzadeh** <<mohammadkeyvanzade94@gmail.com>> (he/him)
|
|
452
456
|
* [watilde](https://github.com/watilde) -
|
|
453
457
|
**Daijiro Wachi** <<daijiro.wachi@gmail.com>> (he/him)
|
|
454
|
-
* [XadillaX](https://github.com/XadillaX) -
|
|
455
|
-
**Khaidi Chu** <<i@2333.moe>> (he/him)
|
|
456
|
-
* [yashLadha](https://github.com/yashLadha) -
|
|
457
|
-
**Yash Ladha** <<yash@yashladha.in>> (he/him)
|
|
458
458
|
* [zcbenz](https://github.com/zcbenz) -
|
|
459
459
|
**Cheng Zhao** <<zcbenz@gmail.com>> (he/him)
|
|
460
460
|
* [ZYSzys](https://github.com/ZYSzys) -
|
|
@@ -593,6 +593,8 @@ For information about the governance of the Node.js project, see
|
|
|
593
593
|
**Mathias Buus** <<mathiasbuus@gmail.com>> (he/him)
|
|
594
594
|
* [matthewloring](https://github.com/matthewloring) -
|
|
595
595
|
**Matthew Loring** <<mattloring@google.com>>
|
|
596
|
+
* [Mesteery](https://github.com/Mesteery) -
|
|
597
|
+
**Mestery** <<mestery@protonmail.com>> (he/him)
|
|
596
598
|
* [micnic](https://github.com/micnic) -
|
|
597
599
|
**Nicu Micleușanu** <<micnic90@gmail.com>> (he/him)
|
|
598
600
|
* [mikeal](https://github.com/mikeal) -
|
|
@@ -609,6 +611,8 @@ For information about the governance of the Node.js project, see
|
|
|
609
611
|
**Chen Gang** <<gangc.cxy@foxmail.com>>
|
|
610
612
|
* [mscdex](https://github.com/mscdex) -
|
|
611
613
|
**Brian White** <<mscdex@mscdex.net>>
|
|
614
|
+
* [MylesBorins](https://github.com/MylesBorins) -
|
|
615
|
+
**Myles Borins** <<myles.borins@gmail.com>> (he/him)
|
|
612
616
|
* [not-an-aardvark](https://github.com/not-an-aardvark) -
|
|
613
617
|
**Teddy Katz** <<teddy.katz@gmail.com>> (he/him)
|
|
614
618
|
* [ofrobots](https://github.com/ofrobots) -
|
|
@@ -703,6 +707,10 @@ For information about the governance of the Node.js project, see
|
|
|
703
707
|
**Thomas Watson** <<w@tson.dk>>
|
|
704
708
|
* [whitlockjc](https://github.com/whitlockjc) -
|
|
705
709
|
**Jeremy Whitlock** <<jwhitlock@apache.org>>
|
|
710
|
+
* [XadillaX](https://github.com/XadillaX) -
|
|
711
|
+
**Khaidi Chu** <<i@2333.moe>> (he/him)
|
|
712
|
+
* [yashLadha](https://github.com/yashLadha) -
|
|
713
|
+
**Yash Ladha** <<yash@yashladha.in>> (he/him)
|
|
706
714
|
* [yhwang](https://github.com/yhwang) -
|
|
707
715
|
**Yihong Wang** <<yh.wang@ibm.com>>
|
|
708
716
|
* [yorkie](https://github.com/yorkie) -
|
package/bin/node
CHANGED
|
Binary file
|
package/include/node/common.gypi
CHANGED
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
['target_arch in "arm ia32 mips mipsel ppc"', {
|
|
116
116
|
'v8_enable_pointer_compression': 0,
|
|
117
117
|
'v8_enable_31bit_smis_on_64bit_arch': 0,
|
|
118
|
+
'v8_enable_sandbox': 0
|
|
118
119
|
}],
|
|
119
120
|
['target_arch in "ppc64 s390x"', {
|
|
120
121
|
'v8_enable_backtrace': 1,
|
|
@@ -554,6 +555,9 @@
|
|
|
554
555
|
'-Wl,-brtl',
|
|
555
556
|
],
|
|
556
557
|
}, { # else it's `AIX`
|
|
558
|
+
'variables': {
|
|
559
|
+
'gcc_major': '<!(<(python) -c "import os; import subprocess; CXX=os.environ.get(\'CXX\', \'g++\'); subprocess.run([CXX, \'-dumpversion\'])")'
|
|
560
|
+
},
|
|
557
561
|
# Disable the following compiler warning:
|
|
558
562
|
#
|
|
559
563
|
# warning: visibility attribute not supported in this
|
|
@@ -564,7 +568,7 @@
|
|
|
564
568
|
# out more relevant warnings.
|
|
565
569
|
'cflags': [ '-Wno-attributes' ],
|
|
566
570
|
'ldflags': [
|
|
567
|
-
'-Wl,-blibpath:/usr/lib:/lib:/opt/freeware/lib/pthread/ppc64',
|
|
571
|
+
'-Wl,-blibpath:/usr/lib:/lib:/opt/freeware/lib/gcc/powerpc-ibm-aix7.3.0.0/>(gcc_major)/pthread/ppc64:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/>(gcc_major)/pthread/ppc64:/opt/freeware/lib/pthread/ppc64',
|
|
568
572
|
],
|
|
569
573
|
}],
|
|
570
574
|
],
|
package/include/node/config.gypi
CHANGED
|
@@ -242,6 +242,7 @@
|
|
|
242
242
|
'lib/internal/streams/destroy.js',
|
|
243
243
|
'lib/internal/streams/duplex.js',
|
|
244
244
|
'lib/internal/streams/duplexify.js',
|
|
245
|
+
'lib/internal/streams/duplexpair.js',
|
|
245
246
|
'lib/internal/streams/end-of-stream.js',
|
|
246
247
|
'lib/internal/streams/from.js',
|
|
247
248
|
'lib/internal/streams/lazy_transform.js',
|
|
@@ -390,6 +391,7 @@
|
|
|
390
391
|
'v8_enable_maglev': 0,
|
|
391
392
|
'v8_enable_object_print': 1,
|
|
392
393
|
'v8_enable_pointer_compression': 0,
|
|
394
|
+
'v8_enable_sandbox': 0,
|
|
393
395
|
'v8_enable_shared_ro_heap': 1,
|
|
394
396
|
'v8_enable_v8_checks': 0,
|
|
395
397
|
'v8_enable_webassembly': 1,
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
EXTERN_C_START
|
|
51
51
|
|
|
52
52
|
NAPI_EXTERN napi_status NAPI_CDECL napi_get_last_error_info(
|
|
53
|
-
|
|
53
|
+
node_api_basic_env env, const napi_extended_error_info** result);
|
|
54
54
|
|
|
55
55
|
// Getters for defined singletons
|
|
56
56
|
NAPI_EXTERN napi_status NAPI_CDECL napi_get_undefined(napi_env env,
|
|
@@ -94,19 +94,19 @@ NAPI_EXTERN napi_status NAPI_CDECL napi_create_string_utf16(napi_env env,
|
|
|
94
94
|
napi_value* result);
|
|
95
95
|
#ifdef NAPI_EXPERIMENTAL
|
|
96
96
|
#define NODE_API_EXPERIMENTAL_HAS_EXTERNAL_STRINGS
|
|
97
|
-
NAPI_EXTERN napi_status NAPI_CDECL
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
97
|
+
NAPI_EXTERN napi_status NAPI_CDECL node_api_create_external_string_latin1(
|
|
98
|
+
napi_env env,
|
|
99
|
+
char* str,
|
|
100
|
+
size_t length,
|
|
101
|
+
node_api_basic_finalize finalize_callback,
|
|
102
|
+
void* finalize_hint,
|
|
103
|
+
napi_value* result,
|
|
104
|
+
bool* copied);
|
|
105
105
|
NAPI_EXTERN napi_status NAPI_CDECL
|
|
106
106
|
node_api_create_external_string_utf16(napi_env env,
|
|
107
107
|
char16_t* str,
|
|
108
108
|
size_t length,
|
|
109
|
-
|
|
109
|
+
node_api_basic_finalize finalize_callback,
|
|
110
110
|
void* finalize_hint,
|
|
111
111
|
napi_value* result,
|
|
112
112
|
bool* copied);
|
|
@@ -318,12 +318,13 @@ napi_define_class(napi_env env,
|
|
|
318
318
|
napi_value* result);
|
|
319
319
|
|
|
320
320
|
// Methods to work with external data objects
|
|
321
|
-
NAPI_EXTERN napi_status NAPI_CDECL
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
321
|
+
NAPI_EXTERN napi_status NAPI_CDECL
|
|
322
|
+
napi_wrap(napi_env env,
|
|
323
|
+
napi_value js_object,
|
|
324
|
+
void* native_object,
|
|
325
|
+
node_api_basic_finalize finalize_cb,
|
|
326
|
+
void* finalize_hint,
|
|
327
|
+
napi_ref* result);
|
|
327
328
|
NAPI_EXTERN napi_status NAPI_CDECL napi_unwrap(napi_env env,
|
|
328
329
|
napi_value js_object,
|
|
329
330
|
void** result);
|
|
@@ -333,7 +334,7 @@ NAPI_EXTERN napi_status NAPI_CDECL napi_remove_wrap(napi_env env,
|
|
|
333
334
|
NAPI_EXTERN napi_status NAPI_CDECL
|
|
334
335
|
napi_create_external(napi_env env,
|
|
335
336
|
void* data,
|
|
336
|
-
|
|
337
|
+
node_api_basic_finalize finalize_cb,
|
|
337
338
|
void* finalize_hint,
|
|
338
339
|
napi_value* result);
|
|
339
340
|
NAPI_EXTERN napi_status NAPI_CDECL napi_get_value_external(napi_env env,
|
|
@@ -432,7 +433,7 @@ NAPI_EXTERN napi_status NAPI_CDECL
|
|
|
432
433
|
napi_create_external_arraybuffer(napi_env env,
|
|
433
434
|
void* external_data,
|
|
434
435
|
size_t byte_length,
|
|
435
|
-
|
|
436
|
+
node_api_basic_finalize finalize_cb,
|
|
436
437
|
void* finalize_hint,
|
|
437
438
|
napi_value* result);
|
|
438
439
|
#endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED
|
|
@@ -474,7 +475,7 @@ napi_get_dataview_info(napi_env env,
|
|
|
474
475
|
size_t* byte_offset);
|
|
475
476
|
|
|
476
477
|
// version management
|
|
477
|
-
NAPI_EXTERN napi_status NAPI_CDECL napi_get_version(
|
|
478
|
+
NAPI_EXTERN napi_status NAPI_CDECL napi_get_version(node_api_basic_env env,
|
|
478
479
|
uint32_t* result);
|
|
479
480
|
|
|
480
481
|
// Promises
|
|
@@ -498,7 +499,7 @@ NAPI_EXTERN napi_status NAPI_CDECL napi_run_script(napi_env env,
|
|
|
498
499
|
|
|
499
500
|
// Memory management
|
|
500
501
|
NAPI_EXTERN napi_status NAPI_CDECL napi_adjust_external_memory(
|
|
501
|
-
|
|
502
|
+
node_api_basic_env env, int64_t change_in_bytes, int64_t* adjusted_value);
|
|
502
503
|
|
|
503
504
|
#if NAPI_VERSION >= 5
|
|
504
505
|
|
|
@@ -520,7 +521,7 @@ NAPI_EXTERN napi_status NAPI_CDECL
|
|
|
520
521
|
napi_add_finalizer(napi_env env,
|
|
521
522
|
napi_value js_object,
|
|
522
523
|
void* finalize_data,
|
|
523
|
-
|
|
524
|
+
node_api_basic_finalize finalize_cb,
|
|
524
525
|
void* finalize_hint,
|
|
525
526
|
napi_ref* result);
|
|
526
527
|
|
|
@@ -530,7 +531,7 @@ napi_add_finalizer(napi_env env,
|
|
|
530
531
|
#define NODE_API_EXPERIMENTAL_HAS_POST_FINALIZER
|
|
531
532
|
|
|
532
533
|
NAPI_EXTERN napi_status NAPI_CDECL
|
|
533
|
-
node_api_post_finalizer(
|
|
534
|
+
node_api_post_finalizer(node_api_basic_env env,
|
|
534
535
|
napi_finalize finalize_cb,
|
|
535
536
|
void* finalize_data,
|
|
536
537
|
void* finalize_hint);
|
|
@@ -575,13 +576,13 @@ napi_get_all_property_names(napi_env env,
|
|
|
575
576
|
|
|
576
577
|
// Instance data
|
|
577
578
|
NAPI_EXTERN napi_status NAPI_CDECL
|
|
578
|
-
napi_set_instance_data(
|
|
579
|
+
napi_set_instance_data(node_api_basic_env env,
|
|
579
580
|
void* data,
|
|
580
581
|
napi_finalize finalize_cb,
|
|
581
582
|
void* finalize_hint);
|
|
582
583
|
|
|
583
|
-
NAPI_EXTERN napi_status NAPI_CDECL
|
|
584
|
-
|
|
584
|
+
NAPI_EXTERN napi_status NAPI_CDECL
|
|
585
|
+
napi_get_instance_data(node_api_basic_env env, void** data);
|
|
585
586
|
#endif // NAPI_VERSION >= 6
|
|
586
587
|
|
|
587
588
|
#if NAPI_VERSION >= 7
|
|
@@ -27,7 +27,7 @@ typedef struct napi_env__* napi_env;
|
|
|
27
27
|
// meaning that they do not affect the state of the JS engine, and can
|
|
28
28
|
// therefore be called synchronously from a finalizer that itself runs
|
|
29
29
|
// synchronously during GC. Such APIs can receive either a `napi_env` or a
|
|
30
|
-
// `
|
|
30
|
+
// `node_api_basic_env` as their first parameter, because we should be able to
|
|
31
31
|
// also call them during normal, non-garbage-collecting operations, whereas
|
|
32
32
|
// APIs that affect the state of the JS engine can only receive a `napi_env` as
|
|
33
33
|
// their first parameter, because we must not call them during GC. In lieu of
|
|
@@ -37,19 +37,21 @@ typedef struct napi_env__* napi_env;
|
|
|
37
37
|
// expecting a non-const value.
|
|
38
38
|
//
|
|
39
39
|
// In conjunction with appropriate CFLAGS to warn us if we're passing a const
|
|
40
|
-
// (
|
|
41
|
-
// definition of
|
|
42
|
-
//
|
|
43
|
-
// (unless the user explicitly casts the environment), we achieve
|
|
44
|
-
// to ensure at compile time that we do not call APIs that affect
|
|
45
|
-
// the JS engine from a synchronous (
|
|
40
|
+
// (basic) environment into an API that expects a non-const environment, and
|
|
41
|
+
// the definition of basic finalizer function pointer types below, which
|
|
42
|
+
// receive a basic environment as their first parameter, and can thus only call
|
|
43
|
+
// basic APIs (unless the user explicitly casts the environment), we achieve
|
|
44
|
+
// the ability to ensure at compile time that we do not call APIs that affect
|
|
45
|
+
// the state of the JS engine from a synchronous (basic) finalizer.
|
|
46
46
|
#if !defined(NAPI_EXPERIMENTAL) || \
|
|
47
47
|
(defined(NAPI_EXPERIMENTAL) && \
|
|
48
|
-
defined(NODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT)
|
|
48
|
+
(defined(NODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT) || \
|
|
49
|
+
defined(NODE_API_EXPERIMENTAL_BASIC_ENV_OPT_OUT)))
|
|
49
50
|
typedef struct napi_env__* node_api_nogc_env;
|
|
50
51
|
#else
|
|
51
52
|
typedef const struct napi_env__* node_api_nogc_env;
|
|
52
53
|
#endif
|
|
54
|
+
typedef node_api_nogc_env node_api_basic_env;
|
|
53
55
|
|
|
54
56
|
typedef struct napi_value__* napi_value;
|
|
55
57
|
typedef struct napi_ref__* napi_ref;
|
|
@@ -147,13 +149,15 @@ typedef void(NAPI_CDECL* napi_finalize)(napi_env env,
|
|
|
147
149
|
|
|
148
150
|
#if !defined(NAPI_EXPERIMENTAL) || \
|
|
149
151
|
(defined(NAPI_EXPERIMENTAL) && \
|
|
150
|
-
defined(NODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT)
|
|
152
|
+
(defined(NODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT) || \
|
|
153
|
+
defined(NODE_API_EXPERIMENTAL_BASIC_ENV_OPT_OUT)))
|
|
151
154
|
typedef napi_finalize node_api_nogc_finalize;
|
|
152
155
|
#else
|
|
153
156
|
typedef void(NAPI_CDECL* node_api_nogc_finalize)(node_api_nogc_env env,
|
|
154
157
|
void* finalize_data,
|
|
155
158
|
void* finalize_hint);
|
|
156
159
|
#endif
|
|
160
|
+
typedef node_api_nogc_finalize node_api_basic_finalize;
|
|
157
161
|
|
|
158
162
|
typedef struct {
|
|
159
163
|
// One of utf8name or name should be NULL.
|