Skip to content

Commit

Permalink
deps: V8: cherry-pick 26fd1dfa9cd6
Browse files Browse the repository at this point in the history
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 <[email protected]>
    Reviewed-by: Leszek Swirski <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#92123}

Refs: v8/v8@26fd1df
  • Loading branch information
aduh95 committed Nov 15, 2024
1 parent 799abbf commit 1c5f103
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
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.38',
'v8_embedder_string': '-node.39',

##### 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 @@ -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
Expand Down

0 comments on commit 1c5f103

Please sign in to comment.