Uh oh!
There was an error while loading. Please reload this page.
src: handle empty Maybe(Local) in node_util.cc - #33867
Conversation
Uh oh!
There was an error while loading. Please reload this page.
| if (!args[1]->Uint32Value(env->context()).To(&index)) return; | ||
| Local<Private> private_symbol = IndexToPrivateSymbol(env, index); | ||
| Local<Value> ret; | ||
| if (obj->GetPrivate(env->context(), private_symbol).ToLocal(&ret)) |
There was a problem hiding this comment.
I'm not 100% sure but I don't think GetPrivate() can actually fail provided that obj->IsObject().
addaleax
commented
Jun 14, 2020
@bnoordhuis The point isn’t so much as to whether these ops can currently fail or not, it’s more that I want to move more of our code into a state where it is “obviously not broken”, and be consistent about that. At least the |
bnoordhuis
commented
Jun 14, 2020
We'll have to disagree on what "obviously not broken" means. Replacing Point ceded on the (You can probably trigger it if you go out of your way to poison the runtime but normally I would expect it to be a bug on our side.) |
addaleax
commented
Jun 14, 2020
Like a lot of operations, it fails when JS execution is being terminated. That’s one of the main points here – it is only obvious that |
bnoordhuis
commented
Jun 15, 2020
If My point about changing the CHECK remains though: it serves no point that I can see. |
addaleax
commented
Jun 15, 2020
Because I thought it was obvious, sorry. I’ll add
Okay, since you feel strongly about it, I’ve restored it, and switched to the variant that we use when we |
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot
commented
Jun 19, 2020
nodejs-github-bot
commented
Jun 24, 2020
PR-URL: #33867 Refs: https://github.com/nodejs/node/blob/master/src/README.md#checked-conversion Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
jasnell
commented
Jun 25, 2020
Landed in 8e12962 |
PR-URL: #33867 Refs: https://github.com/nodejs/node/blob/master/src/README.md#checked-conversion Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #33867 Refs: https://github.com/nodejs/node/blob/master/src/README.md#checked-conversion Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #33867 Refs: https://github.com/nodejs/node/blob/master/src/README.md#checked-conversion Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #33867 Refs: https://github.com/nodejs/node/blob/master/src/README.md#checked-conversion Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #33867 Refs: https://github.com/nodejs/node/blob/master/src/README.md#checked-conversion Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Refs: https://github.com/nodejs/node/blob/master/src/README.md#checked-conversion
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes