Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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
PR-URL: #55961
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
  • Loading branch information
syg authored and aduh95 committed Jan 22, 2025
commit 1f667cd4ea9d468f17a71f4a3de2ad495c45b738
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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.24',
'v8_embedder_string': '-node.25',

##### V8 defaults for Node.js #####

Expand Down
14 changes: 14 additions & 0 deletions deps/v8/src/execution/isolate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5193,6 +5193,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
Expand Down