nsBlockFrame* tmp = this; *aInstancePtr = (void*) tmp;
*aInstancePtr = (void*) (this);
nsBlockFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr){  if (NULL == aInstancePtr) {    return NS_ERROR_NULL_POINTER;  }  if (aIID.Equals(kBlockFrameCID)) {    nsBlockFrame* tmp = this;    *aInstancePtr = (void*) tmp;    return NS_OK;  }  if (aIID.Equals(nsILineIterator::GetIID())) {    nsLineIterator* it = new nsLineIterator;    if (!it) {      *aInstancePtr = nsnull;      return NS_ERROR_OUT_OF_MEMORY;    }    const nsStyleDisplay* display;    GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&) display);    nsresult rv = it->Init(mLines,                           display->mDirection == NS_STYLE_DIRECTION_RTL);    if (NS_FAILED(rv)) {      delete it;      return rv;    }    return it->QueryInterface(aIID, aInstancePtr);  }  return nsBlockFrameSuper::QueryInterface(aIID, aInstancePtr);}