Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 87853f3805a9f3a8fc2463f35ce8b2effa9fc16e..a30d6ab0d1ceccea5a973752c3963faac83d651e 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -1976,12 +1976,11 @@ void JSObject::EnqueueChangeRecord(Handle<JSObject> object, |
const char* type_str, |
Handle<Name> name, |
Handle<Object> old_value) { |
+ ASSERT(!object->IsJSGlobalProxy()); |
+ ASSERT(!object->IsJSGlobalObject()); |
Isolate* isolate = object->GetIsolate(); |
HandleScope scope(isolate); |
Handle<String> type = isolate->factory()->InternalizeUtf8String(type_str); |
- if (object->IsJSGlobalObject()) { |
- object = handle(JSGlobalObject::cast(*object)->global_receiver(), isolate); |
- } |
Handle<Object> args[] = { type, object, name, old_value }; |
int argc = name.is_null() ? 2 : old_value->IsTheHole() ? 3 : 4; |
@@ -5927,6 +5926,8 @@ MaybeHandle<Object> JSObject::Freeze(Handle<JSObject> object) { |
void JSObject::SetObserved(Handle<JSObject> object) { |
+ ASSERT(!object->IsJSGlobalProxy()); |
+ ASSERT(!object->IsJSGlobalObject()); |
Isolate* isolate = object->GetIsolate(); |
Handle<Map> new_map; |
Handle<Map> old_map(object->map(), isolate); |