ObjectData *FrameInjection::getThisForArrow() {
  ObjectData *ret = m_object.get();
  if (ret && ret->o_getId()) {
    return ret;
  }
  throw FatalErrorException("Using $this when not in object context");
}
ObjectData *FrameInjection::getThis() {
  ObjectData *ret = m_object.get();
  if (ret && !ret->o_getId()) {
    ret = NULL;
  }
  return ret;
}