зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1694393 - Make it easy to enable nsIContent::List() in opt builds. r=smaug
By using a separate define than DEBUG. Differential Revision: https://phabricator.services.mozilla.com/D106137
This commit is contained in:
Родитель
ceb2414add
Коммит
e2c6f319f3
|
@ -358,7 +358,7 @@ nsresult CharacterData::SetTextInternal(
|
|||
|
||||
// Implementation of nsIContent
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef MOZ_DOM_LIST
|
||||
void CharacterData::ToCString(nsAString& aBuf, int32_t aOffset,
|
||||
int32_t aLen) const {
|
||||
if (mText.Is2b()) {
|
||||
|
|
|
@ -159,7 +159,9 @@ class CharacterData : public nsIContent {
|
|||
|
||||
void SaveSubtreeState() final {}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef MOZ_DOM_LIST
|
||||
void ToCString(nsAString& aBuf, int32_t aOffset, int32_t aLen) const;
|
||||
|
||||
void List(FILE* out, int32_t aIndent) const override {}
|
||||
|
||||
void DumpContent(FILE* out, int32_t aIndent, bool aDumpAll) const override {}
|
||||
|
@ -197,10 +199,6 @@ class CharacterData : public nsIContent {
|
|||
|
||||
//----------------------------------------
|
||||
|
||||
#ifdef DEBUG
|
||||
void ToCString(nsAString& aBuf, int32_t aOffset, int32_t aLen) const;
|
||||
#endif
|
||||
|
||||
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_INHERITED(
|
||||
CharacterData, nsIContent)
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ JSObject* DocumentFragment::WrapNode(JSContext* aCx,
|
|||
|
||||
bool DocumentFragment::IsNodeOfType(uint32_t aFlags) const { return false; }
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef MOZ_DOM_LIST
|
||||
void DocumentFragment::List(FILE* out, int32_t aIndent) const {
|
||||
int32_t indent;
|
||||
for (indent = aIndent; --indent >= 0;) {
|
||||
|
|
|
@ -85,7 +85,7 @@ class DocumentFragment : public FragmentOrElement {
|
|||
static already_AddRefed<DocumentFragment> Constructor(
|
||||
const GlobalObject& aGlobal, ErrorResult& aRv);
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef MOZ_DOM_LIST
|
||||
virtual void List(FILE* out, int32_t aIndent) const override;
|
||||
virtual void DumpContent(FILE* out, int32_t aIndent,
|
||||
bool aDumpAll) const override;
|
||||
|
|
|
@ -2849,7 +2849,7 @@ void Element::DescribeAttribute(uint32_t index,
|
|||
aOutDescription.Append('"');
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef MOZ_DOM_LIST
|
||||
void Element::ListAttributes(FILE* out) const {
|
||||
uint32_t index, count = mAttrs.AttrCount();
|
||||
for (index = 0; index < count; index++) {
|
||||
|
|
|
@ -1038,7 +1038,7 @@ class Element : public FragmentOrElement {
|
|||
return GetParsedAttr(nsGkAtoms::_class);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef MOZ_DOM_LIST
|
||||
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override {
|
||||
List(out, aIndent, ""_ns);
|
||||
}
|
||||
|
|
|
@ -785,6 +785,10 @@ class nsIContent : public nsINode {
|
|||
|
||||
public:
|
||||
#ifdef DEBUG
|
||||
# define MOZ_DOM_LIST
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_DOM_LIST
|
||||
/**
|
||||
* List the content (and anything it contains) out to the given
|
||||
* file stream. Use aIndent as the base indent during formatting.
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "nsThreadUtils.h"
|
||||
#include "nsStubMutationObserver.h"
|
||||
#include "mozilla/IntegerPrintfMacros.h"
|
||||
#ifdef DEBUG
|
||||
#ifdef MOZ_DOM_LIST
|
||||
# include "nsRange.h"
|
||||
#endif
|
||||
|
||||
|
@ -127,7 +127,7 @@ void nsTextNode::UnbindFromTree(bool aNullParent) {
|
|||
CharacterData::UnbindFromTree(aNullParent);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef MOZ_DOM_LIST
|
||||
void nsTextNode::List(FILE* out, int32_t aIndent) const {
|
||||
int32_t index;
|
||||
for (index = aIndent; --index >= 0;) fputs(" ", out);
|
||||
|
|
|
@ -52,7 +52,7 @@ class nsTextNode : public mozilla::dom::Text {
|
|||
nsresult AppendTextForNormalize(const char16_t* aBuffer, uint32_t aLength,
|
||||
bool aNotify, nsIContent* aNextSibling);
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef MOZ_DOM_LIST
|
||||
virtual void List(FILE* out, int32_t aIndent) const override;
|
||||
virtual void DumpContent(FILE* out, int32_t aIndent,
|
||||
bool aDumpAll) const override;
|
||||
|
|
|
@ -32,7 +32,7 @@ already_AddRefed<CharacterData> CDATASection::CloneDataNode(
|
|||
return it.forget();
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef MOZ_DOM_LIST
|
||||
void CDATASection::List(FILE* out, int32_t aIndent) const {
|
||||
int32_t index;
|
||||
for (index = aIndent; --index >= 0;) fputs(" ", out);
|
||||
|
|
|
@ -44,7 +44,7 @@ class CDATASection final : public Text {
|
|||
virtual already_AddRefed<CharacterData> CloneDataNode(
|
||||
mozilla::dom::NodeInfo* aNodeInfo, bool aCloneText) const override;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef MOZ_DOM_LIST
|
||||
virtual void List(FILE* out, int32_t aIndent) const override;
|
||||
virtual void DumpContent(FILE* out, int32_t aIndent,
|
||||
bool aDumpAll) const override;
|
||||
|
|
|
@ -86,7 +86,7 @@ already_AddRefed<CharacterData> ProcessingInstruction::CloneDataNode(
|
|||
return do_AddRef(new (nim) ProcessingInstruction(ni.forget(), data));
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef MOZ_DOM_LIST
|
||||
void ProcessingInstruction::List(FILE* out, int32_t aIndent) const {
|
||||
int32_t index;
|
||||
for (index = aIndent; --index >= 0;) fputs(" ", out);
|
||||
|
|
|
@ -28,7 +28,7 @@ class ProcessingInstruction : public CharacterData {
|
|||
virtual already_AddRefed<CharacterData> CloneDataNode(
|
||||
dom::NodeInfo* aNodeInfo, bool aCloneText) const override;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef MOZ_DOM_LIST
|
||||
virtual void List(FILE* out, int32_t aIndent) const override;
|
||||
virtual void DumpContent(FILE* out, int32_t aIndent,
|
||||
bool aDumpAll) const override;
|
||||
|
|
|
@ -887,7 +887,7 @@ void nsXULElement::DestroyContent() {
|
|||
nsStyledElement::DestroyContent();
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef MOZ_DOM_LIST
|
||||
void nsXULElement::List(FILE* out, int32_t aIndent) const {
|
||||
nsCString prefix("XUL");
|
||||
if (HasSlots()) {
|
||||
|
|
|
@ -364,7 +364,7 @@ class nsXULElement : public nsStyledElement {
|
|||
virtual void DestroyContent() override;
|
||||
virtual void DoneAddingChildren(bool aHaveNotified) override;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef MOZ_DOM_LIST
|
||||
virtual void List(FILE* out, int32_t aIndent) const override;
|
||||
virtual void DumpContent(FILE* out, int32_t aIndent,
|
||||
bool aDumpAll) const override {}
|
||||
|
|
Загрузка…
Ссылка в новой задаче