Closed Bug 1122995 Opened 9 years ago Closed 9 years ago

Clarify the lifetime rules applying to the permanent and non-permanent nsIATOM* members in nsAtomTable.cpp; r=froydnj

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

Details

Attachments

(1 file)

      No description provided.
Assignee: nobody → ehsan
Comment on attachment 8550799 [details] [diff] [review]
Clarify the lifetime rules applying to the permanent and non-permanent nsIATOM* members in nsAtomTable.cpp

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

r=me with a suitable answer to the below question.

::: xpcom/ds/nsAtomTable.cpp
@@ +171,5 @@
>    }
> +
> +private:
> +  NS_IMETHOD_(MozExternalRefCountType) AddRef();
> +  NS_IMETHOD_(MozExternalRefCountType) Release();

I don't know that this change really accomplishes anything, and is slightly confusing (though [class.access.virt] explicitly covers this sort of thing).  What's the rationale for doing this?
Attachment #8550799 - Flags: review?(nfroyd) → review+
Just trying to make it impossible to call AddRef/Release on concrete PermanentAtomImpl types (I know that this won't disallow virtual dispatch, but it's the best we can do here.  FWIW I believe these functions _will_ be called at runtime through virtual dispatch, but their implementation makes that OK.)
https://hg.mozilla.org/mozilla-central/rev/4a3d85dc67fc
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: