Bug 1141905 part 4. Add some assertions about what enclosingScope can return for non-scope objects. r=waldo

This commit is contained in:
Boris Zbarsky
2015-03-12 21:46:57 -04:00
parent 02b7e5e041
commit efe7bddb93
5 changed files with 23 additions and 17 deletions

View File

@@ -4173,9 +4173,6 @@ JSObject::getParent() const
if (Shape *shape = maybeShape())
return shape->getObjectParent();
// Avoid the parent-link checking in JSObject::global. Unboxed plain
// objects keep their compartment's global alive through their layout, and
// don't need a read barrier here.
MOZ_ASSERT(is<UnboxedPlainObject>());
return compartment()->unsafeUnbarrieredMaybeGlobal();
return &global();
}