Uh oh!
There was an error while loading. Please reload this page.
lib: support returning Safe collections from C++ - #36989
Conversation
ccec24a to
e5c872fCompare
aduh95
left a comment
There was a problem hiding this comment.
I think it'd interesting to add a check that we're no longer using user-mutable methods:
constassert=require('assert');const{ options }=require('internal/options');assert.notStrictEqual(options.get,Map.prototype.get);constassert=require('assert');const{ getOptionValue }=require('internal/options');Map.prototype.get=functionget(){return'polluted result';};assert.strictEqual(getOptionValue('--expose-internals'),true);Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
e5c872f to
ad9b5a5CompareExE-Boss
commented
Jan 19, 2021
That will fail unless |
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
fd622d9 to
b427d33CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
nodejs-github-bot
commented
Jan 20, 2021
nodejs-github-bot
commented
Jan 22, 2021
jasnell
commented
Jan 23, 2021
Landed in 3ec7114 |
Refs:#36652
This works similarly to what’s done to support constructing
Bufferinstances from C++, but unlikeBuffer.prototype, theSafe*collection prototypes can be captured as soon asInitializePrimordialshas finished runninglib/internal/per_context/primordials.js.