Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 732477cd81ff9852091de87e7a262a58e2bcecfc..431559d4f396104543f9c4760dfe0bd67f106fd7 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -828,6 +828,13 @@ MaybeHandle<Object> JSProxy::GetProperty(Isolate* isolate, |
Handle<Name> name, |
Handle<Object> receiver, |
LanguageMode language_mode) { |
+ if (receiver->IsJSGlobalObject()) { |
+ THROW_NEW_ERROR( |
+ isolate, |
+ NewTypeError(MessageTemplate::kReadGlobalReferenceThroughProxy, name), |
+ Object); |
+ } |
+ |
STACK_CHECK(MaybeHandle<Object>()); |
Handle<Name> trap_name = isolate->factory()->get_string(); |
// 1. Assert: IsPropertyKey(P) is true. |