Skip to content

Commit

Permalink
Bug 1078744 - Replace SetIsDOMBinding with SetIsNonDOMBinding, remove…
Browse files Browse the repository at this point in the history
… nsWrapperCache::SetIsDOMBinding. r=bz.
  • Loading branch information
petervanderbeken committed Oct 7, 2014
1 parent eeab937 commit 6faf934
Show file tree
Hide file tree
Showing 205 changed files with 9 additions and 346 deletions.
1 change: 0 additions & 1 deletion content/base/public/FragmentOrElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class nsChildContentList MOZ_FINAL : public nsINodeList
explicit nsChildContentList(nsINode* aNode)
: mNode(aNode)
{
SetIsDOMBinding();
}

NS_DECL_CYCLE_COLLECTING_ISUPPORTS
Expand Down
1 change: 0 additions & 1 deletion content/base/public/nsDOMFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,6 @@ class nsDOMFileList MOZ_FINAL : public nsIDOMFileList,
public:
explicit nsDOMFileList(nsISupports *aParent) : mParent(aParent)
{
SetIsDOMBinding();
}

NS_DECL_CYCLE_COLLECTING_ISUPPORTS
Expand Down
1 change: 0 additions & 1 deletion content/base/public/nsINode.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ class nsINode : public mozilla::dom::EventTarget
mSubtreeRoot(MOZ_THIS_IN_INITIALIZER_LIST()),
mSlots(nullptr)
{
SetIsDOMBinding();
}
#endif

Expand Down
2 changes: 0 additions & 2 deletions content/base/src/Attr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ Attr::Attr(nsDOMAttributeMap *aAttrMap,

// We don't add a reference to our content. It will tell us
// to drop our reference when it goes away.

SetIsDOMBinding();
}

NS_IMPL_CYCLE_COLLECTION_CLASS(Attr)
Expand Down
1 change: 0 additions & 1 deletion content/base/src/DOMImplementation.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ class DOMImplementation MOZ_FINAL : public nsIDOMDOMImplementation
, mBaseURI(aBaseURI)
{
MOZ_ASSERT(aOwner);
SetIsDOMBinding();
}

NS_DECL_CYCLE_COLLECTING_ISUPPORTS
Expand Down
3 changes: 0 additions & 3 deletions content/base/src/DOMMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class DOMMatrixReadOnly : public nsWrapperCache
explicit DOMMatrixReadOnly(nsISupports* aParent)
: mParent(aParent), mMatrix2D(new gfx::Matrix())
{
SetIsDOMBinding();
}

DOMMatrixReadOnly(nsISupports* aParent, const DOMMatrixReadOnly& other)
Expand All @@ -39,8 +38,6 @@ class DOMMatrixReadOnly : public nsWrapperCache
} else {
mMatrix3D = new gfx::Matrix4x4(*other.mMatrix3D);
}

SetIsDOMBinding();
}

#define GetMatrixMember(entry2D, entry3D, default) \
Expand Down
1 change: 0 additions & 1 deletion content/base/src/DOMParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ using namespace mozilla::dom;
DOMParser::DOMParser()
: mAttemptedInit(false)
{
SetIsDOMBinding();
}

DOMParser::~DOMParser()
Expand Down
1 change: 0 additions & 1 deletion content/base/src/DOMParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ class DOMParser MOZ_FINAL : public nsIDOMParser,
explicit DOMParser(nsISupports* aOwner) : mOwner(aOwner), mAttemptedInit(false)
{
MOZ_ASSERT(aOwner);
SetIsDOMBinding();
}

nsresult InitInternal(nsISupports* aOwner, nsIPrincipal* prin,
Expand Down
1 change: 0 additions & 1 deletion content/base/src/DOMPoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class DOMPointReadOnly : public nsWrapperCache
, mZ(aZ)
, mW(aW)
{
SetIsDOMBinding();
}

double X() const { return mX; }
Expand Down
2 changes: 0 additions & 2 deletions content/base/src/DOMQuad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DOMQuad, Release)
DOMQuad::DOMQuad(nsISupports* aParent, CSSPoint aPoints[4])
: mParent(aParent)
{
SetIsDOMBinding();
for (uint32_t i = 0; i < 4; ++i) {
mPoints[i] = new DOMPoint(aParent, aPoints[i].x, aPoints[i].y);
}
Expand All @@ -32,7 +31,6 @@ DOMQuad::DOMQuad(nsISupports* aParent, CSSPoint aPoints[4])
DOMQuad::DOMQuad(nsISupports* aParent)
: mParent(aParent)
{
SetIsDOMBinding();
}

DOMQuad::~DOMQuad()
Expand Down
2 changes: 0 additions & 2 deletions content/base/src/DOMRect.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class DOMRectReadOnly : public nsISupports
explicit DOMRectReadOnly(nsISupports* aParent)
: mParent(aParent)
{
SetIsDOMBinding();
}

nsISupports* GetParentObject() const
Expand Down Expand Up @@ -155,7 +154,6 @@ class DOMRectList MOZ_FINAL : public nsIDOMClientRectList,
public:
explicit DOMRectList(nsISupports *aParent) : mParent(aParent)
{
SetIsDOMBinding();
}

NS_DECL_CYCLE_COLLECTING_ISUPPORTS
Expand Down
5 changes: 0 additions & 5 deletions content/base/src/DOMStringList.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ class DOMStringList : public nsISupports,
virtual ~DOMStringList();

public:
DOMStringList()
{
SetIsDOMBinding();
}

NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMStringList)

Expand Down
2 changes: 0 additions & 2 deletions content/base/src/Element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -876,8 +876,6 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(DestinationInsertionPointList)
DestinationInsertionPointList::DestinationInsertionPointList(Element* aElement)
: mParent(aElement)
{
SetIsDOMBinding();

nsTArray<nsIContent*>* destPoints = aElement->GetExistingDestInsertionPoints();
if (destPoints) {
for (uint32_t i = 0; i < destPoints->Length(); i++) {
Expand Down
5 changes: 0 additions & 5 deletions content/base/src/StyleSheetList.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ class StyleSheetList : public nsIDOMStyleSheetList
, public nsWrapperCache
{
public:
StyleSheetList()
{
SetIsDOMBinding();
}

NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(StyleSheetList)
NS_DECL_NSIDOMSTYLESHEETLIST
Expand Down
5 changes: 0 additions & 5 deletions content/base/src/nsContentList.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ class Element;
class nsBaseContentList : public nsINodeList
{
public:
nsBaseContentList()
{
SetIsDOMBinding();
}

NS_DECL_CYCLE_COLLECTING_ISUPPORTS

// nsIDOMNodeList
Expand Down
1 change: 0 additions & 1 deletion content/base/src/nsDOMAttributeMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ nsDOMAttributeMap::nsDOMAttributeMap(Element* aContent)
{
// We don't add a reference to our content. If it goes away,
// we'll be told to drop our reference
SetIsDOMBinding();
}

/**
Expand Down
1 change: 0 additions & 1 deletion content/base/src/nsDOMCaretPosition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ using namespace mozilla::dom;
nsDOMCaretPosition::nsDOMCaretPosition(nsINode* aNode, uint32_t aOffset)
: mOffset(aOffset), mOffsetNode(aNode), mAnonymousContentNode(nullptr)
{
SetIsDOMBinding();
}

nsDOMCaretPosition::~nsDOMCaretPosition()
Expand Down
1 change: 0 additions & 1 deletion content/base/src/nsDOMFileReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ nsDOMFileReader::nsDOMFileReader()
mResultArrayBuffer(nullptr)
{
SetDOMStringToNull(mResult);
SetIsDOMBinding();
}

nsDOMFileReader::~nsDOMFileReader()
Expand Down
2 changes: 0 additions & 2 deletions content/base/src/nsDOMMutationObserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class nsDOMMutationRecord : public nsISupports,
nsDOMMutationRecord(nsIAtom* aType, nsISupports* aOwner)
: mType(aType), mAttrNamespace(NullString()), mPrevValue(NullString()), mOwner(aOwner)
{
SetIsDOMBinding();
}

nsISupports* GetParentObject() const
Expand Down Expand Up @@ -347,7 +346,6 @@ class nsDOMMutationObserver : public nsISupports,
: mOwner(aOwner), mLastPendingMutation(nullptr), mPendingMutationCount(0),
mCallback(&aCb), mWaitingForRun(false), mId(++sCount)
{
SetIsDOMBinding();
}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsDOMMutationObserver)
Expand Down
1 change: 0 additions & 1 deletion content/base/src/nsDOMSerializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ using namespace mozilla;

nsDOMSerializer::nsDOMSerializer()
{
SetIsDOMBinding();
}

nsDOMSerializer::~nsDOMSerializer()
Expand Down
1 change: 0 additions & 1 deletion content/base/src/nsDOMSerializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class nsDOMSerializer MOZ_FINAL : public nsIDOMSerializer,
explicit nsDOMSerializer(nsISupports* aOwner) : mOwner(aOwner)
{
MOZ_ASSERT(aOwner);
SetIsDOMBinding();
}

nsCOMPtr<nsISupports> mOwner;
Expand Down
1 change: 0 additions & 1 deletion content/base/src/nsDOMTokenList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ nsDOMTokenList::nsDOMTokenList(Element* aElement, nsIAtom* aAttrAtom)
{
// We don't add a reference to our element. If it goes away,
// we'll be told to drop our reference
SetIsDOMBinding();
}

nsDOMTokenList::~nsDOMTokenList() { }
Expand Down
1 change: 0 additions & 1 deletion content/base/src/nsFormData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ nsFormData::nsFormData(nsISupports* aOwner)
: nsFormSubmission(NS_LITERAL_CSTRING("UTF-8"), nullptr)
, mOwner(aOwner)
{
SetIsDOMBinding();
}

// -------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion content/base/src/nsRange.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ class nsRange MOZ_FINAL : public nsIDOMRange,
, mAssertNextInsertOrAppendNode(nullptr)
#endif
{
SetIsDOMBinding();
MOZ_ASSERT(aNode, "range isn't in a document!");
mOwner = aNode->OwnerDoc();
}
Expand Down
1 change: 0 additions & 1 deletion content/base/src/nsXMLHttpRequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ nsXMLHttpRequest::nsXMLHttpRequest()
mIsMappedArrayBuffer(false),
mXPCOMifier(nullptr)
{
SetIsDOMBinding();
#ifdef DEBUG
StaticAssertions();
#endif
Expand Down
1 change: 0 additions & 1 deletion content/html/content/src/HTMLCanvasElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ HTMLCanvasPrintState::HTMLCanvasPrintState(HTMLCanvasElement* aCanvas,
: mIsDone(false), mPendingNotify(false), mCanvas(aCanvas),
mContext(aContext), mCallback(aCallback)
{
SetIsDOMBinding();
}

HTMLCanvasPrintState::~HTMLCanvasPrintState()
Expand Down
2 changes: 0 additions & 2 deletions content/html/content/src/HTMLContentElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ using namespace mozilla::dom;
HTMLContentElement::HTMLContentElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
: nsGenericHTMLElement(aNodeInfo), mValidSelector(true), mIsInsertionPoint(false)
{
SetIsDOMBinding();
}

HTMLContentElement::~HTMLContentElement()
Expand Down Expand Up @@ -312,7 +311,6 @@ DistributedContentList::DistributedContentList(HTMLContentElement* aHostElement)
: mParent(aHostElement)
{
MOZ_COUNT_CTOR(DistributedContentList);
SetIsDOMBinding();

if (aHostElement->IsInsertionPoint()) {
if (aHostElement->MatchedNodes().IsEmpty()) {
Expand Down
1 change: 0 additions & 1 deletion content/html/content/src/HTMLFormControlsCollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ HTMLFormControlsCollection::HTMLFormControlsCollection(HTMLFormElement* aForm)
, mElements(8)
, mNameLookupTable(HTMLFormElement::FORM_CONTROL_LIST_HASHTABLE_LENGTH)
{
SetIsDOMBinding();
}

HTMLFormControlsCollection::~HTMLFormControlsCollection()
Expand Down
2 changes: 0 additions & 2 deletions content/html/content/src/HTMLOptionsCollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ namespace dom {

HTMLOptionsCollection::HTMLOptionsCollection(HTMLSelectElement* aSelect)
{
SetIsDOMBinding();

// Do not maintain a reference counted reference. When
// the select goes away, it will let us know.
mSelect = aSelect;
Expand Down
2 changes: 0 additions & 2 deletions content/html/content/src/HTMLPropertiesCollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ HTMLPropertiesCollection::HTMLPropertiesCollection(nsGenericHTMLElement* aRoot)
, mDoc(aRoot->GetUncomposedDoc())
, mIsDirty(true)
{
SetIsDOMBinding();
mNames = new PropertyStringList(this);
if (mDoc) {
mDoc->AddMutationObserver(this);
Expand Down Expand Up @@ -311,7 +310,6 @@ PropertyNodeList::PropertyNodeList(HTMLPropertiesCollection* aCollection,
mParent(aParent),
mIsDirty(true)
{
SetIsDOMBinding();
if (mDoc) {
mDoc->AddMutationObserver(this);
}
Expand Down
1 change: 0 additions & 1 deletion content/html/content/src/HTMLShadowElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ using namespace mozilla::dom;
HTMLShadowElement::HTMLShadowElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
: nsGenericHTMLElement(aNodeInfo), mIsInsertionPoint(false)
{
SetIsDOMBinding();
}

HTMLShadowElement::~HTMLShadowElement()
Expand Down
1 change: 0 additions & 1 deletion content/html/content/src/HTMLTableElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ TableRowsCollection::TableRowsCollection(HTMLTableElement *aParent)
nsGkAtoms::tr,
false))
{
SetIsDOMBinding();
}

TableRowsCollection::~TableRowsCollection()
Expand Down
1 change: 0 additions & 1 deletion content/html/content/src/MediaError.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ MediaError::MediaError(HTMLMediaElement* aParent, uint16_t aCode)
: mParent(aParent)
, mCode(aCode)
{
SetIsDOMBinding();
}

NS_IMETHODIMP MediaError::GetCode(uint16_t* aCode)
Expand Down
1 change: 0 additions & 1 deletion content/html/content/src/UndoManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,6 @@ NS_INTERFACE_MAP_END
UndoManager::UndoManager(nsIContent* aNode)
: mHostNode(aNode), mInTransaction(false), mIsDisconnected(false)
{
SetIsDOMBinding();
mTxnManager = new nsTransactionManager();
}

Expand Down
1 change: 0 additions & 1 deletion content/html/content/src/ValidityState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ NS_INTERFACE_MAP_END
ValidityState::ValidityState(nsIConstraintValidation* aConstraintValidation)
: mConstraintValidation(aConstraintValidation)
{
SetIsDOMBinding();
}

NS_IMETHODIMP
Expand Down
2 changes: 0 additions & 2 deletions content/html/content/src/nsDOMStringMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ nsDOMStringMap::nsDOMStringMap(nsGenericHTMLElement* aElement)
: mElement(aElement),
mRemovingProp(false)
{
SetIsDOMBinding();

mElement->AddMutationObserver(this);
}

Expand Down
1 change: 0 additions & 1 deletion content/html/document/src/HTMLAllCollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ HTMLAllCollection::HTMLAllCollection(nsHTMLDocument* aDocument)
: mDocument(aDocument)
{
MOZ_ASSERT(mDocument);
SetIsDOMBinding();
}

HTMLAllCollection::~HTMLAllCollection()
Expand Down
1 change: 0 additions & 1 deletion content/media/DOMMediaStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ DOMMediaStream::DOMMediaStream()
mStream(nullptr), mHintContents(0), mTrackTypesAvailable(0),
mNotifiedOfMediaStreamGraphShutdown(false)
{
SetIsDOMBinding();
}

DOMMediaStream::~DOMMediaStream()
Expand Down
2 changes: 0 additions & 2 deletions content/media/MediaStreamTrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ namespace dom {
MediaStreamTrack::MediaStreamTrack(DOMMediaStream* aStream, TrackID aTrackID)
: mStream(aStream), mTrackID(aTrackID), mEnded(false), mEnabled(true)
{
SetIsDOMBinding();

memset(&mID, 0, sizeof(mID));

nsresult rv;
Expand Down
1 change: 0 additions & 1 deletion content/media/MediaTrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ void
MediaTrack::Init(nsPIDOMWindow* aOwnerWindow)
{
BindToOwner(aOwnerWindow);
SetIsDOMBinding();
}

} // namespace dom
Expand Down
1 change: 0 additions & 1 deletion content/media/TextTrackCueList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ NS_INTERFACE_MAP_END

TextTrackCueList::TextTrackCueList(nsISupports* aParent) : mParent(aParent)
{
SetIsDOMBinding();
}

TextTrackCueList::~TextTrackCueList()
Expand Down
Loading

0 comments on commit 6faf934

Please sign in to comment.