Skip to content

Commit

Permalink
Bug 1805931, part 2 - Automated removal of uses of ROOT and UNROOT CC…
Browse files Browse the repository at this point in the history
… macros. r=smaug

As of the prior patch, these are no longer needed. I removed
these with a script, then ran clang-format on the files, then
manually reverted a few unrelated changed from the formatter.

Differential Revision: https://phabricator.services.mozilla.com/D164829
  • Loading branch information
amccreight committed Dec 15, 2022
1 parent 285e4ec commit e7bd801
Show file tree
Hide file tree
Showing 111 changed files with 0 additions and 350 deletions.
3 changes: 0 additions & 3 deletions accessible/base/AccEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(AccEvent)
}
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(AccEvent, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(AccEvent, Release)

////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// AccTextChangeEvent
Expand Down
3 changes: 0 additions & 3 deletions accessible/base/NotificationController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(NotificationController)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mRelocations)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(NotificationController, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(NotificationController, Release)

////////////////////////////////////////////////////////////////////////////////
// NotificationCollector: public

Expand Down
3 changes: 0 additions & 3 deletions docshell/base/BrowsingContextGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,5 @@ NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(BrowsingContextGroup, mContexts,
mTimerEventQueue, mWorkerEventQueue,
mDocGroups)

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(BrowsingContextGroup, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(BrowsingContextGroup, Release)

} // namespace dom
} // namespace mozilla
3 changes: 0 additions & 3 deletions dom/animation/AnimationEventDispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(AnimationEventDispatcher)
}
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(AnimationEventDispatcher, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(AnimationEventDispatcher, Release)

void AnimationEventDispatcher::Disconnect() {
if (mIsObserving) {
MOZ_ASSERT(mPresContext && mPresContext->RefreshDriver(),
Expand Down
3 changes: 0 additions & 3 deletions dom/animation/CSSPseudoElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ namespace mozilla::dom {

NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(CSSPseudoElement, mOriginatingElement)

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(CSSPseudoElement, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(CSSPseudoElement, Release)

CSSPseudoElement::CSSPseudoElement(dom::Element* aElement,
PseudoStyleType aType)
: mOriginatingElement(aElement), mPseudoType(aType) {
Expand Down
3 changes: 0 additions & 3 deletions dom/animation/EffectCompositor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(EffectCompositor)
}
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(EffectCompositor, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(EffectCompositor, Release)

/* static */
bool EffectCompositor::AllowCompositorAnimationsOnFrame(
const nsIFrame* aFrame,
Expand Down
3 changes: 0 additions & 3 deletions dom/animation/PendingAnimationTracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ namespace mozilla {
NS_IMPL_CYCLE_COLLECTION(PendingAnimationTracker, mPlayPendingSet,
mPausePendingSet, mDocument)

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(PendingAnimationTracker, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(PendingAnimationTracker, Release)

PendingAnimationTracker::PendingAnimationTracker(dom::Document* aDocument)
: mDocument(aDocument) {}

Expand Down
3 changes: 0 additions & 3 deletions dom/animation/ScrollTimelineAnimationTracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ namespace mozilla {

NS_IMPL_CYCLE_COLLECTION(ScrollTimelineAnimationTracker, mPendingSet, mDocument)

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(ScrollTimelineAnimationTracker, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(ScrollTimelineAnimationTracker, Release)

void ScrollTimelineAnimationTracker::TriggerPendingAnimations() {
for (auto iter = mPendingSet.begin(), end = mPendingSet.end(); iter != end;
++iter) {
Expand Down
2 changes: 0 additions & 2 deletions dom/base/AnonymousContent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
namespace mozilla::dom {

// Ref counting and cycle collection
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(AnonymousContent, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(AnonymousContent, Release)
NS_IMPL_CYCLE_COLLECTION(AnonymousContent, mContentNode)

AnonymousContent::AnonymousContent(already_AddRefed<Element> aContentNode)
Expand Down
2 changes: 0 additions & 2 deletions dom/base/CustomElementRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1541,8 +1541,6 @@ void CustomElementReactionsStack::InvokeReactions(ElementQueue* aElementQueue,

NS_IMPL_CYCLE_COLLECTION(CustomElementDefinition, mConstructor, mCallbacks,
mConstructionStack)
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(CustomElementDefinition, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(CustomElementDefinition, Release)

CustomElementDefinition::CustomElementDefinition(
nsAtom* aType, nsAtom* aLocalName, int32_t aNamespaceID,
Expand Down
3 changes: 0 additions & 3 deletions dom/base/DOMMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ static const double radPerDegree = 2.0 * M_PI / 360.0;

NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(DOMMatrixReadOnly, mParent)

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(DOMMatrixReadOnly, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DOMMatrixReadOnly, Release)

JSObject* DOMMatrixReadOnly::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
return DOMMatrixReadOnly_Binding::Wrap(aCx, this, aGivenProto);
Expand Down
3 changes: 0 additions & 3 deletions dom/base/DOMPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ using namespace mozilla::dom;

NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(DOMPointReadOnly, mParent)

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(DOMPointReadOnly, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DOMPointReadOnly, Release)

already_AddRefed<DOMPointReadOnly> DOMPointReadOnly::FromPoint(
const GlobalObject& aGlobal, const DOMPointInit& aParams) {
RefPtr<DOMPointReadOnly> obj = new DOMPointReadOnly(
Expand Down
3 changes: 0 additions & 3 deletions dom/base/DOMQuad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ using namespace mozilla::gfx;
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(DOMQuad, mParent, mPoints[0], mPoints[1],
mPoints[2], mPoints[3])

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(DOMQuad, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DOMQuad, Release)

DOMQuad::DOMQuad(nsISupports* aParent, CSSPoint aPoints[4]) : mParent(aParent) {
for (uint32_t i = 0; i < 4; ++i) {
mPoints[i] = new DOMPoint(aParent, aPoints[i].x, aPoints[i].y);
Expand Down
3 changes: 0 additions & 3 deletions dom/base/DocGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,6 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(DocGroup)
tmp->mDocuments.Clear();
NS_IMPL_CYCLE_COLLECTION_UNLINK_END

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(DocGroup, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DocGroup, Release)

/* static */
already_AddRefed<DocGroup> DocGroup::Create(
BrowsingContextGroup* aBrowsingContextGroup, const nsACString& aKey) {
Expand Down
3 changes: 0 additions & 3 deletions dom/base/External.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ using namespace mozilla::dom;

NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(External, mParent)

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(External, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(External, Release)

JSObject* External::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
return External_Binding::Wrap(aCx, this, aGivenProto);
Expand Down
3 changes: 0 additions & 3 deletions dom/base/IdleRequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(IdleRequest)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCallback)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(IdleRequest, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(IdleRequest, Release)

void IdleRequest::SetTimeoutHandle(int32_t aHandle) {
mTimeoutHandle = Some(aHandle);
}
Expand Down
3 changes: 0 additions & 3 deletions dom/base/NodeInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(NodeInfo)
return nsCCUncollectableMarker::sGeneration && tmp->CanSkip();
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(NodeInfo, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(NodeInfo, Release)

void NodeInfo::GetName(nsAString& aName) const {
mInner.mName->ToString(aName);
}
Expand Down
3 changes: 0 additions & 3 deletions dom/base/PlacesEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(PlacesEvent)
NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER
NS_IMPL_CYCLE_COLLECTION_TRACE_END

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(PlacesEvent, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(PlacesEvent, Release)

already_AddRefed<PlacesEvent> PlacesEvent::Constructor(
const GlobalObject& aGlobal, PlacesEventType aType, ErrorResult& rv) {
RefPtr<PlacesEvent> event = new PlacesEvent(aType);
Expand Down
2 changes: 0 additions & 2 deletions dom/base/PlacesWeakCallbackWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ namespace mozilla::dom {

NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_WEAK_PTR(PlacesWeakCallbackWrapper,
mParent, mCallback)
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(PlacesWeakCallbackWrapper, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(PlacesWeakCallbackWrapper, Release)

PlacesWeakCallbackWrapper::PlacesWeakCallbackWrapper(
nsISupports* aParent, PlacesEventCallback& aCallback)
Expand Down
3 changes: 0 additions & 3 deletions dom/base/Pose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_WITH_JS_MEMBERS(
(mPosition, mLinearVelocity, mLinearAcceleration, mOrientation,
mAngularVelocity, mAngularAcceleration))

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(Pose, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(Pose, Release)

Pose::Pose(nsISupports* aParent)
: mParent(aParent),
mPosition(nullptr),
Expand Down
3 changes: 0 additions & 3 deletions dom/base/ResizeObserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,6 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(ResizeObservation)
tmp->Unlink(RemoveFromObserver::Yes);
NS_IMPL_CYCLE_COLLECTION_UNLINK_END

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(ResizeObservation, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(ResizeObservation, Release)

ResizeObservation::ResizeObservation(Element& aTarget,
ResizeObserver& aObserver,
ResizeObserverBoxOptions aBox)
Expand Down
3 changes: 0 additions & 3 deletions dom/base/ResponsiveImageSelector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ namespace mozilla::dom {

NS_IMPL_CYCLE_COLLECTION(ResponsiveImageSelector, mOwnerNode)

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(ResponsiveImageSelector, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(ResponsiveImageSelector, Release)

static bool ParseInteger(const nsAString& aString, int32_t& aInt) {
nsContentUtils::ParseHTMLIntegerResultFlags parseResult;
aInt = nsContentUtils::ParseHTMLInteger(aString, &parseResult);
Expand Down
2 changes: 0 additions & 2 deletions dom/base/ScreenLuminance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

namespace mozilla::dom {

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(ScreenLuminance, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(ScreenLuminance, Release)
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(ScreenLuminance, mScreen)

JSObject* ScreenLuminance::WrapObject(JSContext* aCx,
Expand Down
3 changes: 0 additions & 3 deletions dom/base/SelectionChangeEventDispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(SelectionChangeEventDispatcher)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mOldRanges);
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(SelectionChangeEventDispatcher, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(SelectionChangeEventDispatcher, Release)

void SelectionChangeEventDispatcher::OnSelectionChange(Document* aDoc,
Selection* aSel,
int16_t aReason) {
Expand Down
3 changes: 0 additions & 3 deletions dom/base/Timeout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Timeout)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mScriptHandler)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(Timeout, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(Timeout, Release)

void Timeout::SetWhenOrTimeRemaining(const TimeStamp& aBaseTime,
const TimeDuration& aDelay) {
MOZ_DIAGNOSTIC_ASSERT(mWindow);
Expand Down
3 changes: 0 additions & 3 deletions dom/base/nsMimeTypeArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ bool nsMimeTypeArray::ForceNoPlugins() {
!nsGlobalWindowInner::Cast(mWindow)->ShouldResistFingerprinting();
}

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(nsMimeType, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(nsMimeType, Release)

NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(nsMimeType, mPluginElement)

nsMimeType::nsMimeType(nsPluginElement* aPluginElement, const nsAString& aName)
Expand Down
3 changes: 0 additions & 3 deletions dom/base/nsNodeInfoManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsNodeInfoManager)
}
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(nsNodeInfoManager, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(nsNodeInfoManager, Release)

NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(nsNodeInfoManager)
if (tmp->mDocument) {
return NS_CYCLE_COLLECTION_PARTICIPANT(mozilla::dom::Document)
Expand Down
3 changes: 0 additions & 3 deletions dom/bindings/IterableIterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ namespace mozilla::dom {

NS_IMPL_CYCLE_COLLECTION_CLASS(IterableIteratorBase)

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(IterableIteratorBase, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(IterableIteratorBase, Release)

NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(IterableIteratorBase)
tmp->TraverseHelper(cb);
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
Expand Down
3 changes: 0 additions & 3 deletions dom/bindings/test/TestInterfaceLength.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

namespace mozilla::dom {

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(TestInterfaceLength, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(TestInterfaceLength, Release)

NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(TestInterfaceLength)

JSObject* TestInterfaceLength::WrapObject(JSContext* aCx,
Expand Down
3 changes: 0 additions & 3 deletions dom/bindings/test/TestTrialInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

namespace mozilla::dom {

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(TestTrialInterface, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(TestTrialInterface, Release)

NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(TestTrialInterface)

JSObject* TestTrialInterface::WrapObject(JSContext* aCx,
Expand Down
5 changes: 0 additions & 5 deletions dom/bindings/test/WrapperCachedNonISupportsTestInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@

namespace mozilla::dom {

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(WrapperCachedNonISupportsTestInterface,
AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(WrapperCachedNonISupportsTestInterface,
Release)

NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(WrapperCachedNonISupportsTestInterface)

JSObject* WrapperCachedNonISupportsTestInterface::WrapObject(
Expand Down
9 changes: 0 additions & 9 deletions dom/canvas/CanvasRenderingContext2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -856,14 +856,8 @@ void CanvasGradient::AddColorStop(float aOffset, const nsACString& aColorstr,
mRawStops.AppendElement(newStop);
}

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(CanvasGradient, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(CanvasGradient, Release)

NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(CanvasGradient, mContext)

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(CanvasPattern, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(CanvasPattern, Release)

NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(CanvasPattern, mContext)

class CanvasShutdownObserver final : public nsIObserver {
Expand Down Expand Up @@ -5825,9 +5819,6 @@ void CanvasRenderingContext2D::SetWriteOnly() {
}
}

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(CanvasPath, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(CanvasPath, Release)

NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(CanvasPath, mParent)

CanvasPath::CanvasPath(nsISupports* aParent) : mParent(aParent) {
Expand Down
3 changes: 0 additions & 3 deletions dom/canvas/ClientWebGLExtensions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ namespace mozilla {

NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(ClientWebGLExtensionBase)

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(ClientWebGLExtensionBase, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(ClientWebGLExtensionBase, Release)

DEFINE_WEBGL_EXTENSION_GOOP(ANGLE_instanced_arrays,
WebGLExtensionInstancedArrays)
DEFINE_WEBGL_EXTENSION_GOOP(EXT_blend_minmax, WebGLExtensionBlendMinMax)
Expand Down
2 changes: 0 additions & 2 deletions dom/canvas/XRWebGLLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ static constexpr float XR_FRAMEBUFFER_MIN_SCALE = 0.2f;
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(XRWebGLLayer, mParent, mSession, mWebGL,
mFramebuffer, mLeftViewport,
mRightViewport)
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(XRWebGLLayer, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(XRWebGLLayer, Release)

XRWebGLLayer::XRWebGLLayer(
nsISupports* aParent, XRSession& aSession, bool aIgnoreDepthValues,
Expand Down
4 changes: 0 additions & 4 deletions dom/events/ClipboardItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ namespace mozilla::dom {

NS_IMPL_CYCLE_COLLECTION(ClipboardItem::ItemEntry, mData,
mPendingGetTypeRequests)
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(ClipboardItem::ItemEntry, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(ClipboardItem::ItemEntry, Release)

ClipboardItem::ItemEntry::ItemEntry(const nsAString& aType,
const nsACString& aFormat)
Expand Down Expand Up @@ -172,8 +170,6 @@ void ClipboardItem::ItemEntry::ResolvePendingGetTypePromises(Blob& aBlob) {
}

NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(ClipboardItem, mOwner, mItems)
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(ClipboardItem, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(ClipboardItem, Release)

ClipboardItem::ClipboardItem(nsISupports* aOwner,
const dom::PresentationStyle aPresentationStyle,
Expand Down
6 changes: 0 additions & 6 deletions dom/events/DeviceMotionEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ already_AddRefed<DeviceMotionEvent> DeviceMotionEvent::Constructor(

NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(DeviceAcceleration, mOwner)

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(DeviceAcceleration, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DeviceAcceleration, Release)

DeviceAcceleration::DeviceAcceleration(DeviceMotionEvent* aOwner,
const Nullable<double>& aX,
const Nullable<double>& aY,
Expand All @@ -114,9 +111,6 @@ DeviceAcceleration::~DeviceAcceleration() = default;

NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(DeviceRotationRate, mOwner)

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(DeviceRotationRate, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DeviceRotationRate, Release)

DeviceRotationRate::DeviceRotationRate(DeviceMotionEvent* aOwner,
const Nullable<double>& aAlpha,
const Nullable<double>& aBeta,
Expand Down
3 changes: 0 additions & 3 deletions dom/events/EventListenerManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,6 @@ void EventListenerManager::RemoveAllListenersSilently() {
mClearingListeners = false;
}

NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(EventListenerManager, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(EventListenerManager, Release)

inline void ImplCycleCollectionTraverse(
nsCycleCollectionTraversalCallback& aCallback,
EventListenerManager::Listener& aField, const char* aName,
Expand Down
Loading

0 comments on commit e7bd801

Please sign in to comment.