Uh oh!
There was an error while loading. Please reload this page.
v8: warn in Template::Set() on improper use - #6277
Conversation
This LGTM |
There was a problem hiding this comment.
Do we need to leave a to-do here?
There was a problem hiding this comment.
I can add a TODO but what should it say?
There was a problem hiding this comment.
Perhaps TODO: Throw Error instead of warning in v7.0?
There was a problem hiding this comment.
Oh, it's not going to throw; newer V8 versions replace it with a CHECK that aborts when it fails.
thefourtheye
commented
Apr 19, 2016
Don't we use dep: as the subsystem? Apart from that LGTM. |
bnoordhuis
commented
Apr 19, 2016
It's a bit of both. Historically, |
thefourtheye
commented
Apr 19, 2016
Oh, I didn't notice that before. Then we can leave it as it is. |
bnoordhuis
commented
Apr 19, 2016
I forgot, cc @nodejs/v8 @jeisinger. |
ofrobots
commented
Apr 19, 2016
I wonder if it makes sense to add a flag (upstream, and floated here) to silence such runtime deprecation warnings. I do think it is good to be noisy by default on such imminent deprecations, but it would also be nice to be able to silence the warning if the user wishes. One the problems native modules have had is that they never realize that things have been deprecated for a long time, and discover it when next Node.js major w/ new V8 drop them. If such a runtime deprecation warning flag existed, we could potentially use it for more things. |
bnoordhuis
commented
Apr 19, 2016
I'd be okay with adding a flag but I assume that also calls for some kind of framework inside V8 for logging deprecation notices? Input on what that should look like appreciated; or if you're willing to take that on, I'm happy to step aside. |
jasnell
commented
Apr 21, 2016
@ofrobots ... well, we do already have a flags for handling deprecations and warnings in node of course. Perhaps it would be possible to provide an API for embedders that would allow handling of the runtime deprecations/warnings to be deferred to the embedder? We could then insert our own logic and control the output using the existing |
jasnell
commented
Apr 21, 2016
Of more immediate concern, however, is whether this particular PR can land as is for v6 or does it need to be tweaked some more? |
bnoordhuis
commented
Apr 21, 2016
If it needs a complete overhaul, then it's not going to be ready for v6.0.0, which would be a shame, IMO. I can add a flag to |
ofrobots
commented
Apr 21, 2016
Given that this is urgent for v6, deciding on the framework before then might not be feasible, I agree. How about something specific for this case for now; specially if we are not pushing it upstream first? Perhaps |
bnoordhuis
commented
Apr 21, 2016
Sounds good, that's more or less what I had in mind. I'll update the PR later today. |
467b4b8 to
50b35aaComparebnoordhuis
commented
Apr 22, 2016
Updated, PTAL. CI: https://ci.nodejs.org/job/node-test-pull-request/2369/ |
jasnell
commented
Apr 22, 2016
LGTM if CI is green |
The next major release will make it a fatal error to use non-primitive values in function templates and object templates. Print a warning that includes the C and JS stack trace to tell people to upgrade their add-ons. The C stack trace is only printed on platforms that support it (the BSDs, OS X and Linux+glibc.) The warning can be disabled with the new `--nowarn_template_set` flag. Refs: nodejs#6216 PR-URL: nodejs#6277 Reviewed-By: James M Snell <jasnell@gmail.com>
50b35aa to
7940ecfCompareThe next major release will make it a fatal error to use non-primitive values in function templates and object templates. Print a warning that includes the C and JS stack trace to tell people to upgrade their add-ons. The C stack trace is only printed on platforms that support it (the BSDs, OS X and Linux+glibc.) The warning can be disabled with the new `--nowarn_template_set` flag. Refs: nodejs#6216 PR-URL: nodejs#6277 Reviewed-By: James M Snell <jasnell@gmail.com>
The next major release will make it a fatal error to use non-primitive values in function templates and object templates. Print a warning that includes the C and JS stack trace to tell people to upgrade their add-ons. The C stack trace is only printed on platforms that support it (the BSDs, OS X and Linux+glibc.) The warning can be disabled with the new `--nowarn_template_set` flag. Refs: #6216 PR-URL: #6277 Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins
commented
Jun 1, 2016
@bnoordhuis looks like this is specific to v8 > 5 |
The next major release will make it a fatal error to use non-primitive values in function templates and object templates. Print a warning that includes the C and JS stack trace to tell people to upgrade their add-ons. The C stack trace is only printed on platforms that support it (the BSDs, OS X and Linux+glibc.) The warning can be disabled with the new `--nowarn_template_set` flag. Refs: nodejs#6216 PR-URL: nodejs#6277 Reviewed-By: James M Snell <jasnell@gmail.com>
The next major release will make it a fatal error to use non-primitive values in function templates and object templates. Print a warning that includes the C and JS stack trace to tell people to upgrade their add-ons. The C stack trace is only printed on platforms that support it (the BSDs, OS X and Linux+glibc.) The warning can be disabled with the new `--nowarn_template_set` flag. Refs: nodejs#6216 PR-URL: nodejs#6277 Reviewed-By: James M Snell <jasnell@gmail.com>
The next major release will make it a fatal error to use non-primitive values in function templates and object templates. Print a warning that includes the C and JS stack trace to tell people to upgrade their add-ons. The C stack trace is only printed on platforms that support it (the BSDs, OS X and Linux+glibc.) The warning can be disabled with the new `--nowarn_template_set` flag. Refs: nodejs#6216 PR-URL: nodejs#6277 Reviewed-By: James M Snell <jasnell@gmail.com>
The next major release will make it a fatal error to use non-primitive values in function templates and object templates. Print a warning that includes the C and JS stack trace to tell people to upgrade their add-ons. The C stack trace is only printed on platforms that support it (the BSDs, OS X and Linux+glibc.) The warning can be disabled with the new `--nowarn_template_set` flag. Refs: nodejs#6216 PR-URL: nodejs#6277 Reviewed-By: James M Snell <jasnell@gmail.com>
The next major release will make it a fatal error to use non-primitive
values in function templates and object templates.
Print a warning that includes the C and JS stack trace to tell people to
upgrade their add-ons. The C stack trace is only printed on platforms
that support it (the BSDs, OS X and Linux+glibc.)
Refs: #6216
Speculative - I'd like some input whether other collaborators think it's a good approach. It can get pretty noisy when native code abuses
v8::Template::Set()a lot but OTOH, hopefully that means it gets fixed quickly.CI: https://ci.nodejs.org/job/node-test-pull-request/2319/