Bug 1193762 part 6 - Return raw pointer, not nsCOMPtr; r=froydnj
authorAryeh Gregor <ayg@aryeh.name>
Sun, 01 May 2016 21:29:23 +0300
changeset 295628 eb70b194e002db926d9020c29a789cef5f705d50
parent 295627 3d3cc3ecdca6c6de7b69c34a551bd8f61b903a97
child 295629 5c6e39260feb78127f51cc66a5ac19b568c39f30
push id76021
push userayg@aryeh.name
push dateSun, 01 May 2016 18:28:55 +0000
treeherdermozilla-inbound@a0daadf6943c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1193762
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1193762 part 6 - Return raw pointer, not nsCOMPtr; r=froydnj This could alternatively have been fixed by changing AccessibleCaret::CaretElement to return an nsCOMPtr instead of a raw pointer, but I chose to change this in the other direction instead, to match the accepted convention.
dom/base/AnonymousContent.cpp
dom/base/AnonymousContent.h
--- a/dom/base/AnonymousContent.cpp
+++ b/dom/base/AnonymousContent.cpp
@@ -24,17 +24,17 @@ NS_IMPL_CYCLE_COLLECTION(AnonymousConten
 AnonymousContent::AnonymousContent(Element* aContentNode) :
   mContentNode(aContentNode)
 {}
 
 AnonymousContent::~AnonymousContent()
 {
 }
 
-nsCOMPtr<Element>
+Element*
 AnonymousContent::GetContentNode()
 {
   return mContentNode;
 }
 
 void
 AnonymousContent::SetContentNode(Element* aContentNode)
 {
--- a/dom/base/AnonymousContent.h
+++ b/dom/base/AnonymousContent.h
@@ -20,17 +20,17 @@ class Element;
 class AnonymousContent final
 {
 public:
   // Ref counting and cycle collection
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(AnonymousContent)
   NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS(AnonymousContent)
 
   explicit AnonymousContent(Element* aContentNode);
-  nsCOMPtr<Element> GetContentNode();
+  Element* GetContentNode();
   void SetContentNode(Element* aContentNode);
   bool WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
 
   // WebIDL methods
   void SetTextContentForElement(const nsAString& aElementId,
                                 const nsAString& aText,
                                 ErrorResult& aRv);