| 966 | |
| 967 | |
| 968 | bool Object::CanSetBase(Object *aBase) |
| 969 | { |
| 970 | auto new_native_base = (!aBase || aBase->IsNativeClassPrototype()) |
| 971 | ? aBase : aBase->GetNativeBase(); |
| 972 | return new_native_base == GetNativeBase() // Cannot change native type. |
| 973 | && !aBase->IsDerivedFrom(this); // Cannot create loops. |
| 974 | } |
| 975 | |
| 976 | |
| 977 | ResultType Object::SetBase(Object *aNewBase, ResultToken &aResultToken) |
nothing calls this directly
no test coverage detected