Skip to content

Commit cc907e4

Browse files
sygaduh95
andcommitted
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: v8/v8@26fd1df Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent bd5303f commit cc907e4

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.38',
39+
'v8_embedder_string': '-node.39',
4040

4141
##### V8 defaults for Node.js #####
4242

deps/v8/src/execution/isolate.cc

+14
Original file line numberDiff line numberDiff line change
@@ -4761,6 +4761,20 @@ MaybeHandle<FixedArray> Isolate::GetImportAssertionsFromArgument(
47614761
// an error.
47624762
return MaybeHandle<FixedArray>();
47634763
}
4764+
4765+
if (V8_UNLIKELY(!import_assertions_object->IsUndefined())) {
4766+
MessageLocation* location = nullptr;
4767+
MessageLocation computed_location;
4768+
if (ComputeLocation(&computed_location)) {
4769+
location = &computed_location;
4770+
}
4771+
Handle<JSMessageObject> message = MessageHandler::MakeMessageObject(
4772+
this, MessageTemplate::kImportAssertDeprecated, location,
4773+
factory()->NewStringFromAsciiChecked("a future version"),
4774+
Handle<FixedArray>::null());
4775+
message->set_error_level(v8::Isolate::kMessageWarning);
4776+
MessageHandler::ReportMessage(this, location, message);
4777+
}
47644778
}
47654779

47664780
// If there is no 'with' or 'assert' option in the options bag, it's not an

0 commit comments

Comments
 (0)