Skip to content

Commit 26fd1df

Browse files
sygV8 LUCI CQ
authored andcommitted
[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 <[email protected]> Reviewed-by: Leszek Swirski <[email protected]> Cr-Commit-Position: refs/heads/main@{#92123}
1 parent 867e6c4 commit 26fd1df

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/execution/isolate.cc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5644,6 +5644,20 @@ MaybeHandle<FixedArray> Isolate::GetImportAttributesFromArgument(
56445644
// an error.
56455645
return MaybeHandle<FixedArray>();
56465646
}
5647+
5648+
if (V8_UNLIKELY(!IsUndefined(*import_attributes_object))) {
5649+
MessageLocation* location = nullptr;
5650+
MessageLocation computed_location;
5651+
if (ComputeLocation(&computed_location)) {
5652+
location = &computed_location;
5653+
}
5654+
Handle<JSMessageObject> message = MessageHandler::MakeMessageObject(
5655+
this, MessageTemplate::kImportAssertDeprecated, location,
5656+
factory()->NewStringFromAsciiChecked("12.6"),
5657+
Handle<FixedArray>::null());
5658+
message->set_error_level(v8::Isolate::kMessageWarning);
5659+
MessageHandler::ReportMessage(this, location, message);
5660+
}
56475661
}
56485662

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

0 commit comments

Comments
 (0)