Skip to content

Commit

Permalink
deps: V8: cherry-pick a2cae2180a7a
Browse files Browse the repository at this point in the history
Original commit message:

    [runtime] Fix handling of interceptors, pt.2

    Stores to undeclared global in strict mode should throw ReferenceError.

    Bug: chromium:1309225
    Change-Id: Iac7c55da2ff9c16e488b4fc66408c5300469873e
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3553099
    Commit-Queue: Igor Sheludko <ishell@chromium.org>
    Auto-Submit: Igor Sheludko <ishell@chromium.org>
    Reviewed-by: Toon Verwaest <verwaest@chromium.org>
    Commit-Queue: Toon Verwaest <verwaest@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#79625}

Refs: v8/v8@a2cae21

PR-URL: #42657
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
  • Loading branch information
targos committed Apr 12, 2022
1 parent d9d26b0 commit 01cea9a
Show file tree
Hide file tree
Showing 2 changed files with 5 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.8',
'v8_embedder_string': '-node.9',

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

Expand Down
4 changes: 4 additions & 0 deletions deps/v8/src/objects/objects.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2702,6 +2702,10 @@ Maybe<bool> Object::SetSuperProperty(LookupIterator* it, Handle<Object> value,
JSReceiver::GetOwnPropertyDescriptor(&own_lookup, &desc);
MAYBE_RETURN(owned, Nothing<bool>());
if (!owned.FromJust()) {
if (!CheckContextualStoreToJSGlobalObject(&own_lookup,
should_throw)) {
return Nothing<bool>();
}
return JSReceiver::CreateDataProperty(&own_lookup, value,
should_throw);
}
Expand Down

0 comments on commit 01cea9a

Please sign in to comment.