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)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
People
(Reporter: jag+mozilla, Assigned: jag+mozilla)
Details
Attachments
(1 file)
|
25.05 KB,
patch
|
bzbarsky
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
| Assignee | ||
Comment 1•22 years ago
|
||
| Assignee | ||
Updated•22 years ago
|
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 3•22 years ago
|
||
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+
| Assignee | ||
Comment 4•22 years ago
|
||
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.
| Assignee | ||
Comment 5•22 years ago
|
||
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.
Description
•