diff options
author | Kyle Farnung <kfarnung@microsoft.com> | 2018-09-05 14:52:26 -0700 |
---|---|---|
committer | Kyle Farnung <kfarnung@microsoft.com> | 2018-09-09 17:48:56 -0700 |
commit | 3bdc61d4d194e2057f5e692036ceb2b3a24cc476 (patch) | |
tree | f1ca3d67973f82ea622794023906da0c12b7f816 /test/fixtures/apilinks | |
parent | 66f563dec783fdfdcbf60d2d453d2bad620edc26 (diff) | |
download | android-node-v8-3bdc61d4d194e2057f5e692036ceb2b3a24cc476.tar.gz android-node-v8-3bdc61d4d194e2057f5e692036ceb2b3a24cc476.tar.bz2 android-node-v8-3bdc61d4d194e2057f5e692036ceb2b3a24cc476.zip |
tools,doc: apilinks should handle root scenarios
* Prevent crash when setting root properties
* Allow return outside of function
PR-URL: https://github.com/nodejs/node/pull/22721
Reviewed-By: Sam Ruby <rubys@intertwingly.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'test/fixtures/apilinks')
-rw-r--r-- | test/fixtures/apilinks/root.js | 10 | ||||
-rw-r--r-- | test/fixtures/apilinks/root.json | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/test/fixtures/apilinks/root.js b/test/fixtures/apilinks/root.js new file mode 100644 index 0000000000..6cf9fee945 --- /dev/null +++ b/test/fixtures/apilinks/root.js @@ -0,0 +1,10 @@ +'use strict'; + +// Set root member +let foo = true; +foo = false; + +// Return outside of function +if (!foo) { + return; +} diff --git a/test/fixtures/apilinks/root.json b/test/fixtures/apilinks/root.json new file mode 100644 index 0000000000..2c63c08510 --- /dev/null +++ b/test/fixtures/apilinks/root.json @@ -0,0 +1,2 @@ +{ +} |