Last Comment Bug 677340 - Stop returning nsCOMPtr by value in various places
: Stop returning nsCOMPtr by value in various places
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Editor (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla8
Assigned To: :Ms2ger
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-08 12:27 PDT by :Ms2ger
Modified: 2011-08-11 12:03 PDT (History)
1 user (show)
Ms2ger: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (21.19 KB, patch)
2011-08-08 12:27 PDT, :Ms2ger
ehsan: review+
Details | Diff | Splinter Review
Patch v1 (diff -w) (17.82 KB, patch)
2011-08-08 12:30 PDT, :Ms2ger
no flags Details | Diff | Splinter Review

Description :Ms2ger 2011-08-08 12:27:30 PDT
Created attachment 551531 [details] [diff] [review]
Patch v1

I believe you owe me a review
Comment 1 :Ms2ger 2011-08-08 12:30:11 PDT
Created attachment 551534 [details] [diff] [review]
Patch v1 (diff -w)
Comment 2 :Ehsan Akhgari 2011-08-08 13:27:58 PDT
Comment on attachment 551531 [details] [diff] [review]
Patch v1

Review of attachment 551531 [details] [diff] [review]:
-----------------------------------------------------------------

::: editor/libeditor/html/nsHTMLEditor.cpp
@@ +941,2 @@
>    if (NS_FAILED(aNode->GetParentNode(getter_AddRefs(p))))  // no parent, ran off top of tree
> +    return NULL;

Use nsnull, please.

@@ +1061,3 @@
>            {
> +            // add range to the list if it doesn't overlap with the previous range
> +            bool addRange = true;

I'm gonna ignore you sneaking in this change, because I like it.  It just makes me sad that you didn't do the same for isNotInlineOrText.  ;-)

@@ +1115,5 @@
>  
>    nsresult rv;
>    nsCOMPtr<nsIContentIterator> iter =
>         do_CreateInstance("@mozilla.org/content/post-content-iterator;1", &rv);
> +  NS_ENSURE_SUCCESS(rv, NULL);

nsnull.

@@ +1151,5 @@
>      else
>        iter->Prev();
>    }
>    
> +  return NULL;

nsnull.
Comment 3 :Ms2ger 2011-08-11 08:05:58 PDT
(In reply to Ehsan Akhgari [:ehsan] from comment #2)
> Comment on attachment 551531 [details] [diff] [review]
> @@ +1061,3 @@
> >            {
> > +            // add range to the list if it doesn't overlap with the previous range
> > +            bool addRange = true;
> 
> I'm gonna ignore you sneaking in this change, because I like it.  It just
> makes me sad that you didn't do the same for isNotInlineOrText.  ;-)

I would have, but it's used as a PRBool* outparam.

Note You need to log in before you can comment on or make changes to this bug.