Closed Bug 1447914 Opened 6 years ago Closed 6 years ago

Change FunctionCall::getAtomName() to appendName()

Categories

(Core :: XSLT, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

Details

Attachments

(1 file)

getAtomName() is only used in one place -- FunctionCall::toString() -- where
the returned atom is appended to a string. This patch changes it to
appendName(), which does the appending itself. This avoids a bunch of manual
atom refcounting and the possibility of failure.

MozReview-Commit-ID: I75rO1Bv6Y8
Priority: -- → P2
Comment on attachment 8961297 [details] [diff] [review]
Change FunctionCall::getAtomName() to appendName()

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

Nice cleanup, just a minor nit.

::: dom/xslt/xpath/txExpr.h
@@ +139,5 @@
>  
>  #ifdef TX_TO_STRING
>  #define TX_DECL_TOSTRING \
>      void toString(nsAString& aDest) override;
>  #define TX_DECL_GETNAMEATOM \

nit: Can you update the macro name?

@@ +140,5 @@
>  #ifdef TX_TO_STRING
>  #define TX_DECL_TOSTRING \
>      void toString(nsAString& aDest) override;
>  #define TX_DECL_GETNAMEATOM \
> +    void appendName(nsAString& aStr) override;

nit: Maybe name the param `aDest` to match `toString`.
Attachment #8961297 - Flags: review?(erahm) → review+
> >  #define TX_DECL_GETNAMEATOM \
> 
> nit: Can you update the macro name?

Good catch.

> > +    void appendName(nsAString& aStr) override;
> 
> nit: Maybe name the param `aDest` to match `toString`.

Sure.
https://hg.mozilla.org/mozilla-central/rev/3145ee5bb85c
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: