diff --git a/src/isolate.cc b/src/isolate.cc index 5f7b3f2d3b..4192d113c7 100644 --- a/src/isolate.cc +++ b/src/isolate.cc @@ -944,11 +944,7 @@ bool Isolate::MayNamedAccess(JSObject* receiver, Object* key, if (decision != UNKNOWN) return decision == YES; // Get named access check callback - // TODO(dcarney): revert - Map* map = receiver->map(); - CHECK(map->IsMap()); - CHECK(map->constructor()->IsJSFunction()); - JSFunction* constructor = JSFunction::cast(map->constructor()); + JSFunction* constructor = JSFunction::cast(receiver->map()->constructor()); if (!constructor->shared()->IsApiFunction()) return false; Object* data_obj = diff --git a/src/objects.cc b/src/objects.cc index 75590835e1..3de981c66a 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -768,8 +768,6 @@ MaybeObject* Object::GetProperty(Object* receiver, // that even though we may not actually end up loading the named // property from the current object, we still check that we have // access to it. - // TODO(dcarney): revert. - CHECK(current->IsJSObject()); JSObject* checked = JSObject::cast(current); if (!heap->isolate()->MayNamedAccess(checked, name, v8::ACCESS_GET)) { return checked->GetPropertyWithFailedAccessCheck(receiver,