8000 [runtime] Fix handling of interceptors, pt.2 · v8/v8@a2cae21 · GitHub
[go: up one dir, main page]

Skip to content

Commit a2cae21

Browse files
isheludkoV8 LUCI CQ
authored andcommitted
[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}
1 parent b086206 commit a2cae21

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/objects/objects.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2702,6 +2702,10 @@ Maybe<bool> Object::SetSuperProperty(LookupIterator* it, Handle<Object> value,
27022702
JSReceiver::GetOwnPropertyDescriptor(&own_lookup, &desc);
27032703
MAYBE_RETURN(owned, Nothing<bool>());
27042704
if (!owned.FromJust()) {
2705+
if (!CheckContextualStoreToJSGlobalObject(&own_lookup,
2706+
should_throw)) {
2707+
return Nothing<bool>();
2708+
}
27052709
return JSReceiver::CreateDataProperty(&own_lookup, value,
27062710
should_throw);
27072711
}

0 commit comments

Comments
 (0)
0