Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 69727d25e3a29e436f228a629ed507fae06cf688..524c0242373f719f95a74e3a3b4a280970fd919b 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -1213,6 +1213,8 @@ MaybeObject* JSObject::AddFastPropertyUsingMap(Map* new_map, |
MaybeObject* JSObject::AddFastProperty(String* name, |
Object* value, |
PropertyAttributes attributes) { |
+ ASSERT(!IsJSGlobalProxy()); |
+ |
// Normalize the object if the name is an actual string (not the |
// hidden symbols) and is not a real identifier. |
StringInputBuffer buffer(name); |
@@ -2288,6 +2290,9 @@ MaybeObject* JSObject::NormalizeProperties(PropertyNormalizationMode mode, |
// The global object is always normalized. |
ASSERT(!IsGlobalObject()); |
+ // JSGlobalProxy must never be normalized |
+ ASSERT(!IsJSGlobalProxy()); |
+ |
// Allocate new content. |
int property_count = map()->NumberOfDescribedProperties(); |
if (expected_additional_properties > 0) { |