Пример #1
0
size_t
nsStringBuffer::SizeOfIncludingThisMustBeUnshared(mozilla::MallocSizeOf aMallocSizeOf) const
  {
    NS_ASSERTION(!IsReadonly(),
                 "shared StringBuffer in SizeOfIncludingThisMustBeUnshared");
    return aMallocSizeOf(this);
  }
Пример #2
0
size_t
nsStringBuffer::SizeOfIncludingThisIfUnshared(mozilla::MallocSizeOf aMallocSizeOf) const
  {
    if (!IsReadonly())
      {
        return SizeOfIncludingThisMustBeUnshared(aMallocSizeOf);
      }
    return 0;
  }
Пример #3
0
void
TextEditRules::WillInsert(Selection& aSelection, bool* aCancel)
{
  MOZ_ASSERT(aCancel);

  if (IsReadonly() || IsDisabled()) {
    *aCancel = true;
    return;
  }

  // initialize out param
  *aCancel = false;

  // check for the magic content node and delete it if it exists
  if (mBogusNode) {
    NS_ENSURE_TRUE_VOID(mTextEditor);
    mTextEditor->DeleteNode(mBogusNode);
    mBogusNode = nullptr;
  }
}