Closed Bug 213601 Opened 22 years ago Closed 22 years ago

Switch some users of NS_NewAtom over to do_GetAtom

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jag+mozilla, Assigned: jag+mozilla)

Details

Attachments

(1 file)

Attached patch switchSplinter Review
Attachment #128362 - Flags: superreview?(dbaron)
Attachment #128362 - Flags: review?(bzbarsky)
Comment on attachment 128362 [details] [diff] [review] switch >Index: editor/libeditor/html/nsHTMLEditor.cpp >@@ -664,7 +664,7 @@ > if (NS_SUCCEEDED(result)) > { > ToLowerCase(tagName); >- nsIAtom *tagAtom = NS_NewAtom(tagName); >+ nsCOMPtr<nsIAtom> tagAtom = do_GetAtom(tagName); > if (!tagAtom) { return NS_ERROR_NULL_POINTER; } > > if (tagAtom==nsEditProperty::p || You need to remove the |NS_RELEASE(tagAtom);|. Other than that, sr=dbaron.
Attachment #128362 - Flags: superreview?(dbaron) → superreview+
Comment on attachment 128362 [details] [diff] [review] switch r=me with the two spots in nsHTMLEditor fixed to not NS_RELEASE the comptr.
Attachment #128362 - Flags: review?(bzbarsky) → review+
oops... I actually made that change, just didn't include it in the patch (c&p from bigger patch). Mind you, the second tagAtom never got released.
Checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: