Bugzilla
Quick Search
Browse
Advanced Search
Reports
Quick Search Help
Documentation
New Account
Log In
Login with GitHub
Remember
Forgot Password
Mozilla Home
Privacy
Cookies
Legal
Attachment 8918162 Details for
Bug 1406395
[patch]
P3: Backout changeset b679806ce7e3 (bug 1384661 part 1)
backout-1-c.patch (text/plain), 5.81 KB, created by
Ben Tian (inactive)
(
hide
)
Description:
P3: Backout changeset b679806ce7e3 (bug 1384661 part 1)
Filename:
MIME Type:
Creator:
Ben Tian (inactive)
Size:
5.81 KB
patch
obsolete
># HG changeset patch ># User btian <btian@mozilla.com> ># Date 1507867603 -28800 ># Fri Oct 13 12:06:43 2017 +0800 ># Node ID 23687008fc2fd35f996bb2e82307306e68f7b150 ># Parent e267c4953f7d6c19d8d5853ea4723a424e495a6a >Bug 1406395 - P3: Backout changeset b679806ce7e3 (bug 1384661 part 1) > >diff --git a/dom/base/FragmentOrElement.cpp b/dom/base/FragmentOrElement.cpp >--- a/dom/base/FragmentOrElement.cpp >+++ b/dom/base/FragmentOrElement.cpp >@@ -493,43 +493,42 @@ NeedsScriptTraverse(nsINode* aNode) > > //---------------------------------------------------------------------- > >-NS_IMPL_CYCLE_COLLECTING_ADDREF(nsAttrChildContentList) >-NS_IMPL_CYCLE_COLLECTING_RELEASE(nsAttrChildContentList) >+NS_IMPL_CYCLE_COLLECTING_ADDREF(nsChildContentList) >+NS_IMPL_CYCLE_COLLECTING_RELEASE(nsChildContentList) > >-// If nsAttrChildContentList is changed so that any additional fields are >+// If nsChildContentList is changed so that any additional fields are > // traversed by the cycle collector, then CAN_SKIP must be updated to > // check that the additional fields are null. >-NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(nsAttrChildContentList) >+NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(nsChildContentList) > >-// nsAttrChildContentList only ever has a single child, its wrapper, so if >+// nsChildContentList only ever has a single child, its wrapper, so if > // the wrapper is known-live, the list can't be part of a garbage cycle. >-NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(nsAttrChildContentList) >+NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(nsChildContentList) > return tmp->HasKnownLiveWrapper(); > NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_END > >-NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_BEGIN(nsAttrChildContentList) >+NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_BEGIN(nsChildContentList) > return tmp->HasKnownLiveWrapperAndDoesNotNeedTracing(tmp); > NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_END > > // CanSkipThis returns false to avoid problems with incomplete unlinking. >-NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(nsAttrChildContentList) >+NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(nsChildContentList) > NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END > >-NS_INTERFACE_TABLE_HEAD(nsAttrChildContentList) >+NS_INTERFACE_TABLE_HEAD(nsChildContentList) > NS_WRAPPERCACHE_INTERFACE_TABLE_ENTRY >- NS_INTERFACE_TABLE(nsAttrChildContentList, nsINodeList, nsIDOMNodeList) >- NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(nsAttrChildContentList) >+ NS_INTERFACE_TABLE(nsChildContentList, nsINodeList, nsIDOMNodeList) >+ NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(nsChildContentList) > NS_INTERFACE_MAP_END > > JSObject* >-nsAttrChildContentList::WrapObject(JSContext *cx, >- JS::Handle<JSObject*> aGivenProto) >+nsChildContentList::WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) > { > return NodeListBinding::Wrap(cx, this, aGivenProto); > } > > NS_IMETHODIMP >-nsAttrChildContentList::GetLength(uint32_t* aLength) >+nsChildContentList::GetLength(uint32_t* aLength) > { > *aLength = mNode ? mNode->GetChildCount() : 0; > >@@ -537,7 +536,7 @@ nsAttrChildContentList::GetLength(uint32 > } > > NS_IMETHODIMP >-nsAttrChildContentList::Item(uint32_t aIndex, nsIDOMNode** aReturn) >+nsChildContentList::Item(uint32_t aIndex, nsIDOMNode** aReturn) > { > nsINode* node = Item(aIndex); > if (!node) { >@@ -550,7 +549,7 @@ nsAttrChildContentList::Item(uint32_t aI > } > > nsIContent* >-nsAttrChildContentList::Item(uint32_t aIndex) >+nsChildContentList::Item(uint32_t aIndex) > { > if (mNode) { > return mNode->GetChildAt(aIndex); >@@ -560,7 +559,7 @@ nsAttrChildContentList::Item(uint32_t aI > } > > int32_t >-nsAttrChildContentList::IndexOf(nsIContent* aContent) >+nsChildContentList::IndexOf(nsIContent* aContent) > { > if (mNode) { > return mNode->IndexOf(aContent); >diff --git a/dom/base/nsChildContentList.h b/dom/base/nsChildContentList.h >--- a/dom/base/nsChildContentList.h >+++ b/dom/base/nsChildContentList.h >@@ -20,20 +20,19 @@ class nsINode; > * and Item to its existing child list. > * @see nsIDOMNodeList > */ >-class nsAttrChildContentList final : public nsINodeList >+class nsChildContentList final : public nsINodeList > { > public: >- explicit nsAttrChildContentList(nsINode* aNode) >+ explicit nsChildContentList(nsINode* aNode) > : mNode(aNode) > { > } > > NS_DECL_CYCLE_COLLECTING_ISUPPORTS >- NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS(nsAttrChildContentList) >+ NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS(nsChildContentList) > > // nsWrapperCache >- virtual JSObject* WrapObject(JSContext *cx, >- JS::Handle<JSObject*> aGivenProto) override; >+ virtual JSObject* WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override; > > // nsIDOMNodeList interface > NS_DECL_NSIDOMNODELIST >@@ -53,7 +52,7 @@ public: > } > > private: >- ~nsAttrChildContentList() {} >+ ~nsChildContentList() {} > > // The node whose children make up the list. > // This is a non-owning ref which is safe because it's set to nullptr by >diff --git a/dom/base/nsINode.cpp b/dom/base/nsINode.cpp >--- a/dom/base/nsINode.cpp >+++ b/dom/base/nsINode.cpp >@@ -409,7 +409,7 @@ nsINode::ChildNodes() > { > nsSlots* slots = Slots(); > if (!slots->mChildNodes) { >- slots->mChildNodes = new nsAttrChildContentList(this); >+ slots->mChildNodes = new nsChildContentList(this); > } > > return slots->mChildNodes; >diff --git a/dom/base/nsINode.h b/dom/base/nsINode.h >--- a/dom/base/nsINode.h >+++ b/dom/base/nsINode.h >@@ -36,7 +36,7 @@ > #endif > > class nsAttrAndChildArray; >-class nsAttrChildContentList; >+class nsChildContentList; > struct nsCSSSelectorList; > class nsDOMAttributeMap; > class nsIAnimationObserver; >@@ -1114,7 +1114,7 @@ public: > * @see nsIDOMNodeList > * @see nsGenericHTMLElement::GetChildNodes > */ >- RefPtr<nsAttrChildContentList> mChildNodes; >+ RefPtr<nsChildContentList> mChildNodes; > > /** > * Weak reference to this node. This is cleared by the destructor of
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Flags:
smaug
: review+
abillings
: approval-mozilla-beta+
abillings
: sec-approval+
Actions:
View
|
Diff
|
Review
Attachments on
bug 1406395
:
8917285
|
8917291
|
8917653
|
8918160
|
8918161
| 8918162