deps: provide more V8 backwards compatibility#23158
deps: provide more V8 backwards compatibility#23158addaleax wants to merge 4 commits intonodejs:masterfrom
Conversation
|
/cc @nodejs/v8-update |
|
CITGM looks a lot nicer now – still a bunch of failures, but nothing related to the V8 changes. CI: https://ci.nodejs.org/job/node-test-pull-request/17506/ (:heavy_check_mark:) |
|
I think we can simply turn on all the node/deps/v8/gypfiles/features.gypi Lines 137 to 139 in a21af5b node/deps/v8/include/v8config.h Lines 337 to 349 in a21af5b editNeed to explicitly add Line 107 in a21af5b and 'defines': [ 'V8_IMMINENT_DEPRECATION_WARNINGS=1' ], somewhere inLines 164 to 168 in a21af5b |
|
I think setting |
Discussion in #23167 |
|
(please make sure the discussion in #23122 about conflicting with V8 updates is resolved before landing this) |
|
Does this need to be on the 11.0.0 milestone? |
|
@jasnell Yes – it unbreaks a large number of native add-ons, and in particular makes CITGM return more meaningful results again. |
thefourtheye
left a comment
There was a problem hiding this comment.
I am no expert in this area, but the reason we are doing this and the changes are straight forward. So LGTM.
Reverting this enables us to provide slower, but longer-lasting
replacements for the deprecated APIs.
Original commit message:
Put back deleted V8_DEPRECATE_SOON methods
This partially reverts
https://chromium-review.googlesource.com/c/v8/v8/+/1177861,
which deleted many V8_DEPRECATE_SOON methods rather than moving them to
V8_DEPRECATED first. This puts them back and marks them V8_DEPRECATED.
Note V8_DEPRECATED that were deleted in the same CL stay deleted.
NOTRY=true
NOPRESUBMIT=true
NOTREECHECKS=true
Bug: v8:7786, v8:8240
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I00330036d957f98dab403465b25e30d8382aac22
Reviewed-on: https://chromium-review.googlesource.com/1251422
Commit-Queue: Dan Elphick <[email protected]>
Reviewed-by: Yang Guo <[email protected]>
Reviewed-by: Michael Hablich <[email protected]>
Cr-Commit-Position: refs/branch-heads/7.0@{nodejs#49}
Cr-Branched-From: 6e2adae6f7f8e891cfd01f3280482b20590427a6-refs/heads/7.0.276@{#1}
Cr-Branched-From: bc08a8624cbbea7a2d30071472bc73ad9544eadf-refs/heads/master@{nodejs#55424}
Refs: v8/v8@9136dd8
Refs: nodejs#23122
Add back a number deprecated APIs, using shims that should work well enough at least for the duration of Node 11 and do not come with significant maintenance overhead. Refs: nodejs#23122
|
@hashseed @targos I’ve updated this – does this solution seem okay to you? CI: https://ci.nodejs.org/job/node-test-pull-request/17637/ |
deps/v8/src/api.cc
Outdated
|
|
||
| bool Value::BooleanValue() const { | ||
| return BooleanValue(Isolate::GetCurrent()->GetCurrentContext()) | ||
| .FromMaybe(false); |
There was a problem hiding this comment.
Depending on what behavior you prefer, you may want to use FromJust() here to cause a crash rather than failing silently.
There was a problem hiding this comment.
Done – this is currently only theoretical, right?
There was a problem hiding this comment.
Ah. Sorry. I actually meant all the other uses of FromMaybe, like in Value::IntegerValue. BooleanValue can actually never throw, so in newer V8 we restored this API already, without the Maybe return value.
There was a problem hiding this comment.
Okay, I understand – that would at least technically be a breaking change, I guess, and we’re past the cut-off date for that for Node 11
|
Landed in 2ba19ff...48d1335 |
Refs: v8/v8@7.0.276.22...7.0.276.24 PR-URL: #23158 Refs: #23122 Reviewed-By: Yang Guo <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
Reverting this enables us to provide slower, but longer-lasting
replacements for the deprecated APIs.
Original commit message:
Put back deleted V8_DEPRECATE_SOON methods
This partially reverts
https://chromium-review.googlesource.com/c/v8/v8/+/1177861,
which deleted many V8_DEPRECATE_SOON methods rather than moving them to
V8_DEPRECATED first. This puts them back and marks them V8_DEPRECATED.
Note V8_DEPRECATED that were deleted in the same CL stay deleted.
NOTRY=true
NOPRESUBMIT=true
NOTREECHECKS=true
Bug: v8:7786, v8:8240
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I00330036d957f98dab403465b25e30d8382aac22
Reviewed-on: https://chromium-review.googlesource.com/1251422
Commit-Queue: Dan Elphick <[email protected]>
Reviewed-by: Yang Guo <[email protected]>
Reviewed-by: Michael Hablich <[email protected]>
Cr-Commit-Position: refs/branch-heads/7.0@{#49}
Cr-Branched-From: 6e2adae6f7f8e891cfd01f3280482b20590427a6-refs/heads/7.0.276@{#1}
Cr-Branched-From: bc08a8624cbbea7a2d30071472bc73ad9544eadf-refs/heads/master@{#55424}
Refs: v8/v8@9136dd8
Refs: #23122
PR-URL: #23158
Reviewed-By: Yang Guo <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Add back a number deprecated APIs, using shims that should work well enough at least for the duration of Node 11 and do not come with significant maintenance overhead. Refs: #23122 PR-URL: #23158 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Yang Guo <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
Refs: v8/v8@7.0.276.22...7.0.276.24 PR-URL: #23158 Refs: #23122 Reviewed-By: Yang Guo <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
Reverting this enables us to provide slower, but longer-lasting
replacements for the deprecated APIs.
Original commit message:
Put back deleted V8_DEPRECATE_SOON methods
This partially reverts
https://chromium-review.googlesource.com/c/v8/v8/+/1177861,
which deleted many V8_DEPRECATE_SOON methods rather than moving them to
V8_DEPRECATED first. This puts them back and marks them V8_DEPRECATED.
Note V8_DEPRECATED that were deleted in the same CL stay deleted.
NOTRY=true
NOPRESUBMIT=true
NOTREECHECKS=true
Bug: v8:7786, v8:8240
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I00330036d957f98dab403465b25e30d8382aac22
Reviewed-on: https://chromium-review.googlesource.com/1251422
Commit-Queue: Dan Elphick <[email protected]>
Reviewed-by: Yang Guo <[email protected]>
Reviewed-by: Michael Hablich <[email protected]>
Cr-Commit-Position: refs/branch-heads/7.0@{#49}
Cr-Branched-From: 6e2adae6f7f8e891cfd01f3280482b20590427a6-refs/heads/7.0.276@{#1}
Cr-Branched-From: bc08a8624cbbea7a2d30071472bc73ad9544eadf-refs/heads/master@{#55424}
Refs: v8/v8@9136dd8
Refs: #23122
PR-URL: #23158
Reviewed-By: Yang Guo <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Add back a number deprecated APIs, using shims that should work well enough at least for the duration of Node 11 and do not come with significant maintenance overhead. Refs: #23122 PR-URL: #23158 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Yang Guo <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
This was introduced in 48d1335. Previously, values such as `undefined` would not be coerced properly because `NumberValue()` returns `NaN` for them. Refs: nodejs#23158
This was introduced in 48d1335. Previously, values such as `undefined` would not be coerced properly because `NumberValue()` returns `NaN` for them. Refs: #23158 PR-URL: #23898 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]>
This was introduced in 48d1335. Previously, values such as `undefined` would not be coerced properly because `NumberValue()` returns `NaN` for them. Refs: #23158 PR-URL: #23898 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]>
This was introduced in 48d1335. Previously, values such as `undefined` would not be coerced properly because `NumberValue()` returns `NaN` for them. Refs: #23158 PR-URL: #23898 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]>
Add back a number deprecated APIs, using shims that should work well enough at least for the duration of Node 11 and do not come with significant maintenance overhead. Refs: nodejs/node#23122 PR-URL: nodejs/node#23158 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Yang Guo <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Patch-Filename: deps_provide_more_v8_backwards_compatibility.patch
Add back a number deprecated APIs, using shims that should work well enough at least for the duration of Node 11 and do not come with significant maintenance overhead. Refs: nodejs/node#23122 PR-URL: nodejs/node#23158 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Yang Guo <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Patch-Filename: deps_provide_more_v8_backwards_compatibility.patch
Add back a number deprecated APIs, using shims that should work well enough at least for the duration of Node 11 and do not come with significant maintenance overhead. Refs: nodejs/node#23122 PR-URL: nodejs/node#23158 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Yang Guo <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Patch-Filename: deps_provide_more_v8_backwards_compatibility.patch
Add back a number deprecated APIs, using shims that should work well enough at least for the duration of Node 11 and do not come with significant maintenance overhead. Refs: nodejs/node#23122 PR-URL: nodejs/node#23158 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Yang Guo <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Patch-Filename: deps_provide_more_v8_backwards_compatibility.patch
Add back a number deprecated APIs, using shims that should work well enough at least for the duration of Node 11 and do not come with significant maintenance overhead. Refs: nodejs/node#23122 PR-URL: nodejs/node#23158 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Yang Guo <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Patch-Filename: deps_provide_more_v8_backwards_compatibility.patch
Add back a number deprecated APIs, using shims that
should work well enough at least for the duration of Node 11
and do not come with significant maintenance overhead.
Refs: #23122
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes