Bug 1141905 part 4. Add some assertions about what enclosingScope can return for non-scope objects. r=waldo
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user