src: fix usage of deprecated V8 API

Namely `GetContinuationPreservedEmbedderData` and
`SetContinuationPreservedEmbedderData` for their "V2" variants.

Refs: https://github.com/v8/v8/commit/da41db36ec78d7c1f37fc7d0c7a7c580fda970fe
PR-URL: https://github.com/nodejs/node/pull/60174
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
This commit is contained in:
Michaël Zasso authored and GitHub committed 2025-10-11 07:57:15 +00:00
1 parent 2e675c4fa3
commit 367bcce6a6
1 file changed
+2 -2
+2 -2
View File
@@ -34,7 +34,7 @@ Scope::~Scope() {
}
Local<Value> current(Isolate* isolate) {
return isolate->GetContinuationPreservedEmbedderData();
return isolate->GetContinuationPreservedEmbedderDataV2().As<Value>();
}
void set(Isolate* isolate, Local<Value> value) {
@@ -43,7 +43,7 @@ void set(Isolate* isolate, Local<Value> value) {
return;
}
isolate->SetContinuationPreservedEmbedderData(value);
isolate->SetContinuationPreservedEmbedderDataV2(value);
}
// NOTE: It's generally recommended to use async_context_frame::Scope