deps: V8: cherry-pick 26fd1dfa9cd6

Original commit message:

    [import-attributes] Deprecate 'assert' for dynamic import as well

    Bug: v8:10958
    Change-Id: I7847bdb5d2c79f057f4e1df99f8f5889788f09cb
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5249778
    Commit-Queue: Shu-yu Guo <syg@chromium.org>
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#92123}

Refs: https://github.com/v8/v8/commit/26fd1dfa9cd6d56eae8ecfc7a136fd6709fba161
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/55873
Fixes: https://github.com/nodejs/node/issues/55869
Reviewed-By: Richard Lau <rlau@redhat.com>
This commit is contained in:
Shu-yu GuoandAntoine du Hamel authored and Antoine du Hamel committed 2025-02-13 11:43:02 +01:00
1 parent 53bb21b093
commit d03a23577d
2 files changed
+15 -1

No files matched your search

+1 -1
View File
@@ -36,7 +36,7 @@
# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.38',
'v8_embedder_string': '-node.39',
##### V8 defaults for Node.js #####
+14
View File
@@ -4761,6 +4761,20 @@ MaybeHandle<FixedArray> Isolate::GetImportAssertionsFromArgument(
// an error.
return MaybeHandle<FixedArray>();
}
if (V8_UNLIKELY(!import_assertions_object->IsUndefined())) {
MessageLocation* location = nullptr;
MessageLocation computed_location;
if (ComputeLocation(&computed_location)) {
location = &computed_location;
}
Handle<JSMessageObject> message = MessageHandler::MakeMessageObject(
this, MessageTemplate::kImportAssertDeprecated, location,
factory()->NewStringFromAsciiChecked("a future version"),
Handle<FixedArray>::null());
message->set_error_level(v8::Isolate::kMessageWarning);
MessageHandler::ReportMessage(this, location, message);
}
}
// If there is no 'with' or 'assert' option in the options bag, it's not an